Skip to content

Commit

Permalink
Fixing the NativeAOT field layout tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tannergooding committed Jan 10, 2023
1 parent 3457948 commit 1b0adc0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,22 @@ public readonly struct Vector128<T>
private readonly ulong _00;
private readonly ulong _01;
}

[Intrinsic]
[StructLayout(LayoutKind.Sequential, Size = 32)]
public readonly struct Vector256<T>
where T : struct
{
private readonly Vector128<T> _lower;
private readonly Vector128<T> _upper;
}

[Intrinsic]
[StructLayout(LayoutKind.Sequential, Size = 64)]
public readonly struct Vector512<T>
where T : struct
{
private readonly Vector256<T> _lower;
private readonly Vector256<T> _upper;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ public void TestAutoTypeLayoutClass32Align()
}

[Fact]
public void TestAutoTypeLayoutClass16Align()
public void TestAutoTypeLayoutClass64Align()
{
MetadataType classType = _testModule.GetType("Auto", "Class64Align");
Assert.Equal(0x48, classType.InstanceByteCount.AsInt);
Expand Down

0 comments on commit 1b0adc0

Please sign in to comment.