Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testers Needed] SPU: Copy with memmove() instead of hand-rolled SSE2 #7016

Merged
merged 1 commit into from Mar 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions rpcs3/Emu/Cell/SPUThread.cpp
Expand Up @@ -1433,6 +1433,9 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)

auto lock = vm::passive_lock(eal & -128, ::align(eal + size, 128));

#ifdef __GNUG__
std::memcpy(dst, src, size);
#else
while (size >= 128)
{
mov_rdata(*reinterpret_cast<decltype(spu_thread::rdata)*>(dst), *reinterpret_cast<const decltype(spu_thread::rdata)*>(src));
Expand All @@ -1450,6 +1453,7 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
src += 16;
size -= 16;
}
#endif

lock->release(0);
break;
Expand Down Expand Up @@ -1483,6 +1487,9 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
}
default:
{
#ifdef __GNUG__
std::memcpy(dst, src, size);
#else
while (size >= 128)
{
mov_rdata(*reinterpret_cast<decltype(spu_thread::rdata)*>(dst), *reinterpret_cast<const decltype(spu_thread::rdata)*>(src));
Expand All @@ -1500,6 +1507,7 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
src += 16;
size -= 16;
}
#endif

break;
}
Expand Down