| 203 | } |
| 204 | |
| 205 | static inline void CopyLine16(u16 * dst16, const u16 * src16, u32 words) |
| 206 | { |
| 207 | #ifdef FAST_TMEM_COPY |
| 208 | DAEDALUS_ASSERT( ((uintptr_t)src16&0x1 )==0, "src is not aligned!"); |
| 209 | |
| 210 | u32 dwords {words >> 1}; |
| 211 | while(dwords--) |
| 212 | { |
| 213 | dst16[0] = src16[1]; |
| 214 | dst16[4] = src16[0]; |
| 215 | dst16+=8; |
| 216 | src16+=2; |
| 217 | } |
| 218 | |
| 219 | // Copy any remaining word |
| 220 | words&= 0x1; |
| 221 | #endif |
| 222 | while(words--) |
| 223 | { |
| 224 | *dst16 = *(u16*)((uintptr_t)src16++ ^ U16_TWIDDLE); |
| 225 | dst16+=4; |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | static inline void CopyLineSwap(void * dst, const void * src, u32 bytes) |
| 230 | { |