shz_sq_memcpy32
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.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
dst | void *SHZ_RESTRICT | |
src | const void *SHZ_RESTRICT | |
bytes | size_t |
Returns
Section titled “Returns”void *
Details
Section titled “Details”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
dstbefore initiating the copy... Which means this routine becomes slower than doing memory-to-memory copies withshz_memcpy32().
Warnings
Section titled “Warnings”srcmust be at least 8-byte aligned, whiledstcan be only 4-byte aligned.bytesmust be a multiple of 32.
Naming and requirements
Section titled “Naming and requirements”sq_: Writes through the SH4 store queues (burst writes to memory or the PVR). (Naming and Suffixes)
Availability
Section titled “Availability”- 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"