Skip to content

Commit

Permalink
Fix issue where calculation of valuetypeshapecharacteristic on Arm64 …
Browse files Browse the repository at this point in the history
…does not match native runtime

- We didn't check to make sure that the type of the Vector<T> was a primitive numeric as the runtime does
- Re-enable test
  • Loading branch information
davidwrighton committed Aug 4, 2022
1 parent ec3e934 commit fa23fc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ public override ComputedStaticFieldLayout ComputeStaticFieldLayout(DefType type,

public override ValueTypeShapeCharacteristics ComputeValueTypeShapeCharacteristics(DefType type)
{
if (type.Context.Target.Architecture == TargetArchitecture.ARM64)
if (type.Context.Target.Architecture == TargetArchitecture.ARM64 &&
type.Instantiation[0].IsPrimitiveNumeric)
{
return type.InstanceFieldSize.AsInt switch
{
Expand Down
3 changes: 0 additions & 3 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,6 @@
<ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_56953/Runtime_56953/*">
<Issue>https://github.com/dotnet/runtime/issues/67870</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/Generics/GenericsTest/*">
<Issue>https://github.com/dotnet/runtime/issues/60036</Issue>
</ExcludeList>
<!-- Arm64 does not support Vector256 -->
<ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/General/Vector256/**">
<Issue>https://github.com/dotnet/runtime/issues/60154</Issue>
Expand Down

0 comments on commit fa23fc9

Please sign in to comment.