GPFifo: Adjust parameter names

This commit is contained in:
Lioncash 2015-09-02 15:20:02 -04:00
parent 3b65c4070c
commit db98efdc98
2 changed files with 24 additions and 30 deletions

View file

@ -104,57 +104,51 @@ void CheckGatherPipe()
} }
} }
void Write8(const u8 _iValue) void Write8(const u8 value)
{ {
// LOG(GPFIFO, "GPFIFO #%x: 0x%02x",ProcessorInterface::Fifo_CPUWritePointer+m_gatherPipeCount, _iValue); FastWrite8(value);
FastWrite8(_iValue);
CheckGatherPipe(); CheckGatherPipe();
} }
void Write16(const u16 _iValue) void Write16(const u16 value)
{ {
// LOG(GPFIFO, "GPFIFO #%x: 0x%04x",ProcessorInterface::Fifo_CPUWritePointer+m_gatherPipeCount, _iValue); FastWrite16(value);
FastWrite16(_iValue);
CheckGatherPipe(); CheckGatherPipe();
} }
void Write32(const u32 _iValue) void Write32(const u32 value)
{ {
//#ifdef _DEBUG FastWrite32(value);
// float floatvalue = *(float*)&_iValue;
// LOG(GPFIFO, "GPFIFO #%x: 0x%08x / %f",ProcessorInterface::Fifo_CPUWritePointer+m_gatherPipeCount, _iValue, floatvalue);
//#endif
FastWrite32(_iValue);
CheckGatherPipe(); CheckGatherPipe();
} }
void Write64(const u64 _iValue) void Write64(const u64 value)
{ {
FastWrite64(_iValue); FastWrite64(value);
CheckGatherPipe(); CheckGatherPipe();
} }
void FastWrite8(const u8 _iValue) void FastWrite8(const u8 value)
{ {
m_gatherPipe[m_gatherPipeCount] = _iValue; m_gatherPipe[m_gatherPipeCount] = value;
++m_gatherPipeCount; ++m_gatherPipeCount;
} }
void FastWrite16(const u16 _iValue) void FastWrite16(const u16 value)
{ {
*(u16*)(&m_gatherPipe[m_gatherPipeCount]) = Common::swap16(_iValue); *(u16*)(&m_gatherPipe[m_gatherPipeCount]) = Common::swap16(value);
m_gatherPipeCount += 2; m_gatherPipeCount += 2;
} }
void FastWrite32(const u32 _iValue) void FastWrite32(const u32 value)
{ {
*(u32*)(&m_gatherPipe[m_gatherPipeCount]) = Common::swap32(_iValue); *(u32*)(&m_gatherPipe[m_gatherPipeCount]) = Common::swap32(value);
m_gatherPipeCount += 4; m_gatherPipeCount += 4;
} }
void FastWrite64(const u64 _iValue) void FastWrite64(const u64 value)
{ {
*(u64*)(&m_gatherPipe[m_gatherPipeCount]) = Common::swap64(_iValue); *(u64*)(&m_gatherPipe[m_gatherPipeCount]) = Common::swap64(value);
m_gatherPipeCount += 8; m_gatherPipeCount += 8;
} }

View file

@ -34,16 +34,16 @@ void FastCheckGatherPipe();
bool IsEmpty(); bool IsEmpty();
// Write // Write
void Write8(const u8 _iValue); void Write8(u8 value);
void Write16(const u16 _iValue); void Write16(u16 value);
void Write32(const u32 _iValue); void Write32(u32 value);
void Write64(const u64 _iValue); void Write64(u64 value);
// These expect pre-byteswapped values // These expect pre-byteswapped values
// Also there's an upper limit of about 512 per batch // Also there's an upper limit of about 512 per batch
// Most likely these should be inlined into JIT instead // Most likely these should be inlined into JIT instead
void FastWrite8(const u8 _iValue); void FastWrite8(u8 value);
void FastWrite16(const u16 _iValue); void FastWrite16(u16 value);
void FastWrite32(const u32 _iValue); void FastWrite32(u32 value);
void FastWrite64(const u64 _iValue); void FastWrite64(u64 value);
} }