Skip to content

Commit

Permalink
Add missing ENREGISTERED_PARAMTYPE_MAXSIZE condition to C# version of…
Browse files Browse the repository at this point in the history
… FpStruct info calculation
  • Loading branch information
tomeksowi committed Jun 25, 2024
1 parent a229831 commit f2b38f8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using ILCompiler;
using Internal.TypeSystem;
using static Internal.JitInterface.FpStruct;
using static Internal.JitInterface.StructFloatFieldInfoFlags;

namespace Internal.JitInterface
{
Expand Down Expand Up @@ -144,6 +143,9 @@ TypeFlags.Array or

public static FpStructInRegistersInfo GetRiscV64PassFpStructInRegistersInfo(TypeDesc td)
{
if (td.GetElementSize().AsInt > ENREGISTERED_PARAMTYPE_MAXSIZE)
return new FpStructInRegistersInfo{};

FpStructInRegistersInfo info = new FpStructInRegistersInfo{};
int nFields = 0;
if (!FlattenFields(td, 0, ref info, ref nFields))
Expand Down

0 comments on commit f2b38f8

Please sign in to comment.