| 61 | #define FAST_TMEM_COPY |
| 62 | |
| 63 | static inline void CopyLineQwords(void * dst, const void * src, u32 qwords) |
| 64 | { |
| 65 | #ifdef FAST_TMEM_COPY |
| 66 | u32* src32 = (u32*)src; |
| 67 | u32* dst32 = (u32*)dst; |
| 68 | |
| 69 | DAEDALUS_ASSERT( ((uintptr_t)src32&0x3)==0, "src is not aligned!"); |
| 70 | |
| 71 | while(qwords--) |
| 72 | { |
| 73 | dst32[0] = BSWAP32(src32[0]); |
| 74 | dst32[1] = BSWAP32(src32[1]); |
| 75 | dst32 += 2; |
| 76 | src32 += 2; |
| 77 | } |
| 78 | #else |
| 79 | u8* src8 = (u8*)src; |
| 80 | u8* dst8 = (u8*)dst; |
| 81 | u32 bytes = qwords * 8; |
| 82 | while(bytes--) |
| 83 | { |
| 84 | *dst8++ = *(u8*)((uintptr_t)src8++ ^ U8_TWIDDLE); |
| 85 | } |
| 86 | #endif |
| 87 | } |
| 88 | |
| 89 | static void CopyLineQwordsSwap(void * dst, const void * src, u32 qwords) |
| 90 | { |