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

[ppc64le] Fixed BinaryFormatter and Tensors tests #107678

Merged
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a9d9b6d
[ppc64le] Fixed thunk address 8 byte alignment issue
alhad-deshpande Sep 8, 2022
2b2092f
Merge branch 'main' of https://github.com/Sapana-Khemkar/runtime into…
alhad-deshpande Oct 19, 2022
3531291
Fixed FSharp crash issue
alhad-deshpande Oct 19, 2022
9a042d7
Merge branch 'dotnet:main' into main
alhad-deshpande Oct 21, 2022
96f7c4d
[ppc64le] Implementation of mono_arch_get_delegate_virtual_invoke_imp…
alhad-deshpande Oct 21, 2022
6a05d50
Fixed clang15 build issues and returning address of sc_sp instead of …
alhad-deshpande Nov 9, 2022
8110ac8
Merge branch 'dotnet:main' into main
alhad-deshpande Nov 9, 2022
18910e3
Merge branch 'dotnet:main' into main
alhad-deshpande Apr 12, 2023
5fc3241
Merge branch 'dotnet:main' into main
alhad-deshpande Apr 17, 2023
6a89b7c
Merge branch 'dotnet:main' into main
alhad-deshpande May 3, 2023
1a1a0e2
Added float32 support and implemented related opcodes
alhad-deshpande May 11, 2023
6b2758d
Correction in OP_RCONV_TO_R cases
alhad-deshpande May 11, 2023
5d9a5db
Merge branch 'dotnet:main' into main
alhad-deshpande May 11, 2023
d1ebd9a
Merge branch 'dotnet:main' into main
alhad-deshpande May 12, 2023
fe1b890
Corrected code for few opcodes
alhad-deshpande May 24, 2023
3fef59b
Merge branch 'main' of https://github.com/Sapana-Khemkar/runtime into…
alhad-deshpande Aug 3, 2023
0cb3cec
Merge branch 'main' of https://github.com/Sapana-Khemkar/runtime into…
alhad-deshpande Aug 11, 2023
a1fec64
[ppc64le] performance improvements while branching
alhad-deshpande Aug 11, 2023
e94afeb
Merge branch 'dotnet:main' into main
alhad-deshpande Aug 11, 2023
c01f25e
Merge branch 'dotnet:main' into main
alhad-deshpande Aug 16, 2023
ae9a4dc
Merge branch 'dotnet:main' into main
alhad-deshpande Sep 1, 2023
7a07fd5
Merge branch 'dotnet:main' into main
alhad-deshpande Mar 27, 2024
c4adfa9
[ppc64le] Fixed insufficient memory exception issue
alhad-deshpande Mar 27, 2024
6bac22e
Merge branch 'dotnet:main' into main
alhad-deshpande Mar 27, 2024
21a1761
Merge branch 'main' of https://github.com/Sapana-Khemkar/runtime into…
alhad-deshpande Mar 27, 2024
6c45c29
Merge branch 'dotnet:main' into main
alhad-deshpande Aug 9, 2024
ab1b66a
[ppc64le] Fixed BinaryFormatter and Tensors tests
alhad-deshpande Sep 11, 2024
d0d2976
Disable System.Runtime.Serialization.Formatters.Tests
akoeplinger Sep 12, 2024
744eb71
Fix tests.proj
akoeplinger Sep 12, 2024
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 @@ -14,7 +14,6 @@ public abstract class BasicObjectTests<T> : SerializationTest<T> where T : ISeri

[Theory]
[MemberData(nameof(SerializableObjects))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/105020", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsPpc64leProcess))]
public void DeserializeStoredObjects(object value, TypeSerializableValue[] serializedData)
{
// Following call may change the contents of the fields by invoking lazy-evaluated properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public partial class BinaryFormatterTests
{
[Theory]
[MemberData(nameof(SerializableObjects_MemberData))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/105020", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsPpc64leProcess))]
public void ValidateAgainstBlobs(object obj, TypeSerializableValue[] blobs)
=> ValidateAndRoundtrip(obj, blobs, isEqualityComparer: false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public void ValidateBasicObjectsRoundtrip(object obj, FormatterAssemblyStyle ass

[Theory]
[SkipOnCoreClr("Takes too long on Checked", ~RuntimeConfiguration.Release)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/105020", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsPpc64leProcess))]
[MemberData(nameof(SerializableObjects_MemberData))]
public void ValidateAgainstBlobs(object obj, TypeSerializableValue[] blobs)
=> ValidateAndRoundtrip(obj, blobs, false);
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\tests\JSImportGenerator.UnitTest\JSImportGenerator.Unit.Tests.csproj" />

<!-- Issue: https://github.com/dotnet/runtime/issues/97296 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Numerics.Tensors\tests\System.Numerics.Tensors.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Numerics.Tensors\tests\Net8Tests\System.Numerics.Tensors.Net8.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.Intrinsics\tests\System.Runtime.Intrinsics.Tests.csproj" />
</ItemGroup>

Expand Down
75 changes: 59 additions & 16 deletions src/mono/mono/mini/mini-ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4221,11 +4221,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ppc_lfd (code, ins->dreg, ins->inst_offset, ins->inst_basereg);
} else {
if (ppc_is_imm32 (ins->inst_offset)) {
ppc_addis (code, ppc_r11, ins->inst_destbasereg, ppc_ha(ins->inst_offset));
ppc_addis (code, ppc_r11, ins->inst_basereg, ppc_ha(ins->inst_offset));
ppc_lfd (code, ins->dreg, ins->inst_offset, ppc_r11);
} else {
ppc_load (code, ppc_r0, ins->inst_offset);
ppc_lfdx (code, ins->dreg, ins->inst_destbasereg, ppc_r0);
ppc_lfdx (code, ins->dreg, ins->inst_basereg, ppc_r0);
}
}
break;
Expand All @@ -4248,11 +4248,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ppc_lfs (code, ins->dreg, ins->inst_offset, ins->inst_basereg);
} else {
if (ppc_is_imm32 (ins->inst_offset)) {
ppc_addis (code, ppc_r11, ins->inst_destbasereg, ppc_ha(ins->inst_offset));
ppc_addis (code, ppc_r11, ins->inst_basereg, ppc_ha(ins->inst_offset));
ppc_lfs (code, ins->dreg, ins->inst_offset, ppc_r11);
} else {
ppc_load (code, ppc_r0, ins->inst_offset);
ppc_lfsx (code, ins->dreg, ins->inst_destbasereg, ppc_r0);
ppc_lfsx (code, ins->dreg, ins->inst_basereg, ppc_r0);
}
}
break;
Expand Down Expand Up @@ -5202,29 +5202,72 @@ mono_arch_emit_prolog (MonoCompile *cfg)
break;
}
} else if (ainfo->regtype == RegTypeFP) {
g_assert (ppc_is_imm16 (inst->inst_offset));
if (ainfo->size == 8)
ppc_stfd (code, ainfo->reg, inst->inst_offset, inst->inst_basereg);
else if (ainfo->size == 4)
ppc_stfs (code, ainfo->reg, inst->inst_offset, inst->inst_basereg);
if (ainfo->size == 8) {
if (ppc_is_imm16 (inst->inst_offset)) {
ppc_stfd (code, ainfo->reg, inst->inst_offset, inst->inst_basereg);
}
else if (ppc_is_imm32 (inst->inst_offset)) {
ppc_addis (code, ppc_r12, inst->inst_basereg, ppc_ha(inst->inst_offset));
ppc_stfd (code, ainfo->reg, inst->inst_offset, ppc_r12);
}
else {
ppc_load (code, ppc_r12, inst->inst_offset);
ppc_stfdx (code, ainfo->reg, inst->inst_basereg, ppc_r12);
}
}
else if (ainfo->size == 4) {
if (ppc_is_imm16 (inst->inst_offset)) {
ppc_stfs (code, ainfo->reg, inst->inst_offset, inst->inst_basereg);
}
else if (ppc_is_imm32 (inst->inst_offset)) {
ppc_addis (code, ppc_r12, inst->inst_basereg, ppc_ha(inst->inst_offset));
ppc_stfs (code, ainfo->reg, inst->inst_offset, ppc_r12);
}
else {
ppc_load (code, ppc_r12, inst->inst_offset);
ppc_stfsx (code, ainfo->reg, inst->inst_basereg, ppc_r12);
}
}
else
g_assert_not_reached ();
} else if (ainfo->regtype == RegTypeFPStructByVal) {
int doffset = inst->inst_offset;
int soffset = 0;
int cur_reg;
int size = 0;
g_assert (ppc_is_imm16 (inst->inst_offset));
g_assert (ppc_is_imm16 (inst->inst_offset + ainfo->vtregs * sizeof (target_mgreg_t)));
/* FIXME: what if there is no class? */
if (sig->pinvoke && !sig->marshalling_disabled && mono_class_from_mono_type_internal (inst->inst_vtype))
size = mono_class_native_size (mono_class_from_mono_type_internal (inst->inst_vtype), NULL);
for (cur_reg = 0; cur_reg < ainfo->vtregs; ++cur_reg) {
if (ainfo->size == 4) {
ppc_stfs (code, ainfo->reg + cur_reg, doffset, inst->inst_basereg);
} else {
ppc_stfd (code, ainfo->reg + cur_reg, doffset, inst->inst_basereg);
}
if (ainfo->size == 8){
if (ppc_is_imm16 (inst->inst_offset)) {
ppc_stfd (code, ainfo->reg + cur_reg, doffset, inst->inst_basereg);
}
else if (ppc_is_imm32 (inst->inst_offset)) {
ppc_addis (code, ppc_r12, inst->inst_basereg, ppc_ha(doffset));
ppc_stfd (code, ainfo->reg + cur_reg, doffset, ppc_r12);
}
else {
ppc_load (code, ppc_r12, doffset);
ppc_stfdx (code, ainfo->reg + cur_reg, inst->inst_basereg, ppc_r12);
}
}
else if (ainfo->size == 4){
if (ppc_is_imm16 (inst->inst_offset)) {
ppc_stfs (code, ainfo->reg + cur_reg, doffset, inst->inst_basereg);
}
else if (ppc_is_imm32 (inst->inst_offset)) {
ppc_addis (code, ppc_r12, inst->inst_basereg, ppc_ha(doffset));
ppc_stfs (code, ainfo->reg + cur_reg, doffset, ppc_r12);
}
else {
ppc_load (code, ppc_r12, doffset);
ppc_stfsx (code, ainfo->reg + cur_reg, inst->inst_basereg, ppc_r12);
}
}
else
g_assert_not_reached ();

soffset += ainfo->size;
doffset += ainfo->size;
}
Expand Down
Loading