PSP: switch from wrapping memcpy to defining our own memcpy
The advantage is that we get to do inlining and even use lwl and lwr instructions where appropriate. We have to do it ourselves because the PSP doesn't tolerate built-in instructions, but also we have a more efficient memcpy than the lib's. svn-id: r52817
This commit is contained in:
parent
05f0ebf262
commit
f7f743ac31
4 changed files with 37 additions and 22 deletions
|
@ -37,23 +37,6 @@
|
|||
|
||||
//#define TEST_MEMORY_COPY
|
||||
|
||||
extern "C" {
|
||||
|
||||
#ifdef TEST_MEMORY_COPY /* we won't be able to run in this case b/c of printouts */
|
||||
extern void *__real_memcpy(void *dst, void *src, size_t bytes);
|
||||
#endif
|
||||
|
||||
void *__wrap_memcpy(void *dst, void *src, size_t bytes) {
|
||||
#ifdef TEST_MEMORY_COPY /* we won't be able to run in this case */
|
||||
return __real_memcpy(dst, src, bytes);
|
||||
#else
|
||||
PspMemory::fastCopy((byte *)dst, (byte *)src, bytes);
|
||||
return dst;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PspMemory::copy(byte *dst, const byte *src, uint32 bytes) {
|
||||
DEBUG_ENTER_FUNC();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue