mark object-return-value as MEMORY if >64bytes

This commit is contained in:
rtldg 2025-03-03 09:19:02 +00:00
parent d2b821e9d1
commit 323671b421

View File

@ -1443,7 +1443,9 @@ namespace SourceHook
//
// Result: we cannot detect if it should be register or memory without knowing the layout of the object.
if (hasSpecialFunctions)
bool tooBig = (pi.size > (8 * 8));
if (hasSpecialFunctions || tooBig)
{
pi.flags |= PassInfo::PassFlag_RetMem;
return true;