SWDEV-497886 - Fix unaligned size copy for kernel args

Change-Id: If6675b98178aeb35f376d6994555cbf941b048c3
此提交包含在:
Saleel Kudchadker
2024-11-12 20:36:43 +00:00
父節點 ec6f83b544
當前提交 2273a1dbdc
+7
查看文件
@@ -3115,6 +3115,13 @@ static inline void nontemporalMemcpy(
_mm_stream_si32(reinterpret_cast<int* __restrict&>(dst)++,
*reinterpret_cast<const int* __restrict&>(src)++);
}
size = size % sizeof(int);
// Copy remaining bytes for unaligned size
std::memcpy(dst, src, size);
// Add memory fence
_mm_sfence();
#else
std::memcpy(dst, src, size);
#endif