Skip to content

shz_sq_memcpy32

Markdown
SHZ_INLINE void* shz_sq_memcpy32( void* SHZ_RESTRICT dst, const void* SHZ_RESTRICT src, size_t bytes) SHZ_NOEXCEPT;

Copies bytes from src to dst in 32-byte chunks, using the Store Queues.

NameTypeDescription
dstvoid *SHZ_RESTRICT
srcconst void *SHZ_RESTRICT
bytessize_t

void *

Transfers from 8-byte aligned buffer, src to 4-byte aligned address, dst, 32 bytes at a time, writing through the cache, using the SH4's Store Queues. Returns the dst address.

  • This is the quickest way to move 32-byte chunks of data to external memory. When copying to cached memory, you must invalidate the cache lines containing dst before initiating the copy... Which means this routine becomes slower than doing memory-to-memory copies with shz_memcpy32().
  • src must be at least 8-byte aligned, while dst can be only 4-byte aligned. bytes must be a multiple of 32.
  • sq_: Writes through the SH4 store queues (burst writes to memory or the PVR). (Naming and Suffixes)
  • C++ equivalent: shz::sq_memcpy32
  • Type-generic form: none
  • Back-ends: SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
  • Defined in: sh4zam/shz_mem.h:211
  • Module: Memory, section "Specializations"

shz_memcpy32, shz_sq_memcpy32_1