Skip to content

Commit

Permalink
SPU DMA: disable memcpy path
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekotekina committed Apr 26, 2020
1 parent 22082d9 commit c374ef8
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions rpcs3/Emu/Cell/SPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1510,11 +1510,7 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)

// Split locking + transfer in two parts (before 64K border, and after it)
const auto lock = vm::range_lock(range_addr, nexta);
#ifdef __GNUG__
std::memcpy(dst, src, size0);
dst += size0;
src += size0;
#else

while (size0 >= 128)
{
mov_rdata(*reinterpret_cast<decltype(spu_thread::rdata)*>(dst), *reinterpret_cast<const decltype(spu_thread::rdata)*>(src));
Expand All @@ -1532,16 +1528,13 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
src += 16;
size0 -= 16;
}
#endif

lock->release(0);
range_addr = nexta;
}

const auto lock = vm::range_lock(range_addr, range_end);

#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 @@ -1559,7 +1552,6 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
src += 16;
size -= 16;
}
#endif

lock->release(0);
break;
Expand Down Expand Up @@ -1593,9 +1585,6 @@ 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 @@ -1613,7 +1602,6 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
src += 16;
size -= 16;
}
#endif

break;
}
Expand Down

0 comments on commit c374ef8

Please sign in to comment.