Copy(To)(From)(Real) elimination

It was nothing but a crutch
This commit is contained in:
Nekotekina 2014-08-05 21:33:02 +04:00
parent 021656d821
commit e7ae71bd73
16 changed files with 75 additions and 268 deletions

View file

@ -461,12 +461,8 @@ s32 cellGcmSetPrepareFlip(mem_ptr_t<CellGcmContextData> ctxt, u32 id)
const s32 res = ctxt->current - ctxt->begin - ctrl.put;
if (res > 0 && !Memory.Copy(ctxt->begin, ctxt->current - res, res))
{
cellGcmSys->Error("cellGcmSetPrepareFlip(): Memory.Copy(0x%x, 0x%x, 0x%x) failed", (u32)ctxt->begin, (u32)ctxt->current - res, res);
Emu.Pause();
return CELL_EFAULT;
}
memmove(Memory + ctxt->begin, Memory + ctxt->current - res, res);
ctxt->current = ctxt->begin + res;
//InterlockedExchange64((volatile long long*)((u8*)&ctrl + offsetof(CellGcmControl, put)), (u64)(u32)re(res));
@ -1119,12 +1115,7 @@ int cellGcmCallback(u32 context_addr, u32 count)
const s32 res = ctx.current - ctx.begin - ctrl.put;
if (res > 0 && !Memory.Copy(ctx.begin, ctx.current - res, res))
{
cellGcmSys->Error("cellGcmCallback(): Memory.Copy(0x%x, 0x%x, 0x%x) failed", (u32)ctx.begin, (u32)ctx.current - res, res);
Emu.Pause();
return CELL_EFAULT;
}
memmove(Memory + ctx.begin, Memory + ctx.current - res, res);
ctx.current = ctx.begin + res;