From 5111fdc0dc464f01647d6b6078342f451bf3a499 Mon Sep 17 00:00:00 2001 From: Qiao Pengcheng Date: Tue, 23 Apr 2024 14:54:08 +0800 Subject: [PATCH] [LoongArch64] amend the LoongArch64Classifier::Classify for passing struct. (#101365) --- src/coreclr/jit/targetloongarch64.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/jit/targetloongarch64.cpp b/src/coreclr/jit/targetloongarch64.cpp index 47f74094fab9d..6d63951c8ea20 100644 --- a/src/coreclr/jit/targetloongarch64.cpp +++ b/src/coreclr/jit/targetloongarch64.cpp @@ -104,7 +104,7 @@ ABIPassingInformation LoongArch64Classifier::Classify(Compiler* comp, } else if ((floatFlags & STRUCT_FLOAT_FIELD_FIRST) != 0) { - slots = 1; + slots = 2; canPassArgInRegisters = (m_floatRegs.Count() > 0) && (m_intRegs.Count() > 0); argRegTypeInStruct1 = (floatFlags & STRUCT_FIRST_FIELD_SIZE_IS8) ? TYP_DOUBLE : TYP_FLOAT; @@ -112,7 +112,7 @@ ABIPassingInformation LoongArch64Classifier::Classify(Compiler* comp, } else if ((floatFlags & STRUCT_FLOAT_FIELD_SECOND) != 0) { - slots = 1; + slots = 2; canPassArgInRegisters = (m_floatRegs.Count() > 0) && (m_intRegs.Count() > 0); argRegTypeInStruct1 = (floatFlags & STRUCT_FIRST_FIELD_SIZE_IS8) ? TYP_LONG : TYP_INT;