Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mono][mini] Fix conversion from STACK_PTR to R8 #88745

Merged
merged 2 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,6 @@ public static void CreateCheckedFromUInt128Test()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69795", TestRuntimes.Mono)]
public static void CreateCheckedFromUIntPtrTest()
{
if (Environment.Is64BitProcess)
Expand Down Expand Up @@ -1580,7 +1579,6 @@ public static void CreateSaturatingFromUInt128Test()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69795", TestRuntimes.Mono)]
public static void CreateSaturatingFromUIntPtrTest()
{
if (Environment.Is64BitProcess)
Expand Down Expand Up @@ -1869,7 +1867,6 @@ public static void CreateTruncatingFromUInt128Test()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69795", TestRuntimes.Mono)]
public static void CreateTruncatingFromUIntPtrTest()
{
if (Environment.Is64BitProcess)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,6 @@ public static void CreateCheckedFromDecimalTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromDoubleTest()
{
Assert.Equal((long)0x0000_0000_0000_0000, NumberBaseHelper<long>.CreateChecked<double>(+0.0));
Expand Down Expand Up @@ -1398,7 +1397,6 @@ public static void CreateCheckedFromIntPtrTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromNFloatTest()
{
Assert.Equal((long)0x0000_0000_0000_0000, NumberBaseHelper<long>.CreateChecked<NFloat>(+0.0f));
Expand Down Expand Up @@ -1445,7 +1443,6 @@ public static void CreateCheckedFromSByteTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromSingleTest()
{
Assert.Equal((long)0x0000_0000_0000_0000, NumberBaseHelper<long>.CreateChecked<float>(+0.0f));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,6 @@ public static void CreateCheckedFromDecimalTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromDoubleTest()
{
Assert.Equal((nint)0x0000_0000, NumberBaseHelper<nint>.CreateChecked<double>(+0.0));
Expand Down Expand Up @@ -2063,7 +2062,6 @@ public static void CreateCheckedFromIntPtrTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromNFloatTest()
{
Assert.Equal((nint)0x0000_0000, NumberBaseHelper<nint>.CreateChecked<NFloat>(+0.0f));
Expand Down Expand Up @@ -2113,7 +2111,6 @@ public static void CreateCheckedFromSByteTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromSingleTest()
{
Assert.Equal((nint)0x0000_0000, NumberBaseHelper<nint>.CreateChecked<float>(+0.0f));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,6 @@ public static void CreateCheckedFromUInt128Test()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69795", TestRuntimes.Mono)]
public static void CreateCheckedFromUIntPtrTest()
{
if (Environment.Is64BitProcess)
Expand Down Expand Up @@ -1584,7 +1583,6 @@ public static void CreateSaturatingFromUInt128Test()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69795", TestRuntimes.Mono)]
public static void CreateSaturatingFromUIntPtrTest()
{
if (Environment.Is64BitProcess)
Expand Down Expand Up @@ -1875,7 +1873,6 @@ public static void CreateTruncatingFromUInt128Test()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69795", TestRuntimes.Mono)]
public static void CreateTruncatingFromUIntPtrTest()
{
if (Environment.Is64BitProcess)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,6 @@ public static void CreateCheckedFromDecimalTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromDoubleTest()
{
Assert.Equal((ulong)0x0000_0000_0000_0000, NumberBaseHelper<ulong>.CreateChecked<double>(+0.0));
Expand Down Expand Up @@ -1398,7 +1397,6 @@ public static void CreateCheckedFromIntPtrTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromNFloatTest()
{
Assert.Equal((ulong)0x0000_0000_0000_0000, NumberBaseHelper<ulong>.CreateChecked<NFloat>(0.0f));
Expand Down Expand Up @@ -1444,7 +1442,6 @@ public static void CreateCheckedFromSByteTest()
}

[Fact]
[SkipOnMono("https://github.com/dotnet/runtime/issues/69795")]
public static void CreateCheckedFromSingleTest()
{
Assert.Equal((ulong)0x0000_0000_0000_0000, NumberBaseHelper<ulong>.CreateChecked<float>(+0.0f));
Expand Down
5 changes: 5 additions & 0 deletions src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,10 +1070,15 @@ type_from_op (MonoCompile *cfg, MonoInst *ins, MonoInst *src1, MonoInst *src2)
ins->type = STACK_R8;
switch (src1->type) {
case STACK_I4:
#if TARGET_SIZEOF_VOID_P == 4
case STACK_PTR:
#endif
ins->opcode = OP_ICONV_TO_R_UN;
break;
case STACK_I8:
#if TARGET_SIZEOF_VOID_P == 8
case STACK_PTR:
#endif
ins->opcode = OP_LCONV_TO_R_UN;
break;
case STACK_R4:
Expand Down