[RISC-V] Fix struct passing on reflection calls (#87535)
authort-mustafin <66252296+t-mustafin@users.noreply.github.com>
Thu, 15 Jun 2023 11:53:56 +0000 (14:53 +0300)
committerGitHub <noreply@github.com>
Thu, 15 Jun 2023 11:53:56 +0000 (13:53 +0200)
src/coreclr/vm/callingconvention.h

index f647945..3f38cc5 100644 (file)
@@ -584,20 +584,13 @@ public:
             return ((m_argSize > ENREGISTERED_PARAMTYPE_MAXSIZE) && (!m_argTypeHandle.IsHFA() || this->IsVarArg()));
         }
         return FALSE;
-#elif defined(TARGET_LOONGARCH64)
+#elif defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
         if (m_argType == ELEMENT_TYPE_VALUETYPE)
         {
             _ASSERTE(!m_argTypeHandle.IsNull());
             return (m_argSize > ENREGISTERED_PARAMTYPE_MAXSIZE);
         }
         return FALSE;
-#elif defined(TARGET_RISCV64)
-        if (m_argType == ELEMENT_TYPE_VALUETYPE)
-        {
-            _ASSERTE(!m_argTypeHandle.IsNull());
-            return ((m_argSize > ENREGISTERED_PARAMTYPE_MAXSIZE) && (!m_argTypeHandle.IsHFA() || this->IsVarArg()));
-        }
-        return FALSE;
 #else
         PORTABILITY_ASSERT("ArgIteratorTemplate::IsArgPassedByRef");
         return FALSE;