-
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.
Fix mono arm assert with large return structs (#77854)
* Fix mono arm assert with large return structs When the return struct is large the store instruction offset is too large. When this happens, put the large offset in a register. * Adding JIT test for large return structs
- Loading branch information
Showing
3 changed files
with
55 additions
and
2 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
37 changes: 37 additions & 0 deletions
37
src/tests/JIT/Regression/JitBlue/GitHub_77854/GitHub_77854.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,37 @@ | ||
// 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; | ||
|
||
public class Program | ||
{ | ||
public static int Main(string[] args) | ||
{ | ||
new Program().TestFunction(); | ||
return 100; | ||
} | ||
|
||
private TestStruct CreateStruct(FourKStruct s, int i) | ||
{ | ||
return new TestStruct { s = s, i = i }; | ||
} | ||
|
||
private TestStruct TestFunction() | ||
{ | ||
return CreateStruct(new FourKStruct(), 42); | ||
} | ||
|
||
private struct TestStruct | ||
{ | ||
public FourKStruct s; | ||
public int i; | ||
} | ||
} | ||
|
||
[StructLayout(LayoutKind.Sequential, Size=4096)] | ||
public partial struct FourKStruct | ||
{ | ||
internal byte bytes; | ||
} |
12 changes: 12 additions & 0 deletions
12
src/tests/JIT/Regression/JitBlue/GitHub_77854/GitHub_77854.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,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DebugType>None</DebugType> | ||
<Optimize>True</Optimize> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildProjectName).cs" /> | ||
</ItemGroup> | ||
</Project> |