-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Fix reordering with 'backfilled' arguments on x86 (#71940)
In a previous change I made the assumption that all register args come before stack args on x86. This assumption is not true. Fix #71939
- Loading branch information
1 parent
9701c5c
commit 52d9d0c
Showing
3 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/tests/JIT/Regression/JitBlue/Runtime_71939/Runtime_71939.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
// Adapted from: | ||
// Generated by Fuzzlyn v1.5 on 2022-07-10 17:11:48 | ||
// Run on X86 Windows | ||
// Seed: 2002556551479521504 | ||
// Reduced from 184.6 KiB to 0.9 KiB in 00:03:45 | ||
// Debug: Outputs 0 | ||
// Release: Outputs -10 | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
||
public class Runtime_71939 | ||
{ | ||
public static int Main() | ||
{ | ||
int v3 = 1; | ||
return Check(0, -v3, Mutate(ref v3)); | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static int Mutate(ref int arg) | ||
{ | ||
arg = 10; | ||
return 0; | ||
} | ||
|
||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
public static int Check(ulong arg0, int arg1, int arg2) | ||
{ | ||
if (arg1 != -1) | ||
{ | ||
Console.WriteLine("FAIL: mutated arg is {0}", arg1); | ||
return -1; | ||
} | ||
|
||
Console.WriteLine("PASS: mutated arg is {0}", arg1); | ||
return 100; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/tests/JIT/Regression/JitBlue/Runtime_71939/Runtime_71939.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |