Expand out a define to get rid of a warning. Get rid of other compiler warnings. Re-indent so that it doesn't look like a statement is part of an if statement when it isn't.

This commit is contained in:
Shanoah Alkire 2018-10-27 02:49:03 -07:00
parent 6710b0c906
commit 122871654e
4 changed files with 30 additions and 21 deletions

View File

@ -17,10 +17,6 @@
#include <xmmintrin.h> #include <xmmintrin.h>
#define StoreDestIdx(idx) \
case idx: \
_mm_store_ps(&destxmm[idx - 1][0], srcreg)
template <u8 data> template <u8 data>
__noinline void memset_sse_a(void *dest, const size_t size) __noinline void memset_sse_a(void *dest, const size_t size)
{ {
@ -39,13 +35,27 @@ __noinline void memset_sse_a(void *dest, const size_t size)
float(*destxmm)[4] = (float(*)[4])dest; float(*destxmm)[4] = (float(*)[4])dest;
switch (MZFqwc & 0x07) { switch (MZFqwc & 0x07) {
StoreDestIdx(0x07); case 0x07:
StoreDestIdx(0x06); _mm_store_ps(&destxmm[0x07 - 1][0], srcreg);
StoreDestIdx(0x05); // Fall through
StoreDestIdx(0x04); case 0x06:
StoreDestIdx(0x03); _mm_store_ps(&destxmm[0x06 - 1][0], srcreg);
StoreDestIdx(0x02); // Fall through
StoreDestIdx(0x01); case 0x05:
_mm_store_ps(&destxmm[0x05 - 1][0], srcreg);
// Fall through
case 0x04:
_mm_store_ps(&destxmm[0x04 - 1][0], srcreg);
// Fall through
case 0x03:
_mm_store_ps(&destxmm[0x03 - 1][0], srcreg);
// Fall through
case 0x02:
_mm_store_ps(&destxmm[0x02 - 1][0], srcreg);
// Fall through
case 0x01:
_mm_store_ps(&destxmm[0x01 - 1][0], srcreg);
// Fall through
} }
destxmm += (MZFqwc & 0x07); destxmm += (MZFqwc & 0x07);
@ -66,8 +76,6 @@ static __fi void memzero_sse_a(void *dest, const size_t size)
memset_sse_a<0>(dest, size); memset_sse_a<0>(dest, size);
} }
#undef StoreDestIdx
template <u8 data, typename T> template <u8 data, typename T>
__noinline void memset_sse_a(T &dest) __noinline void memset_sse_a(T &dest)
{ {

View File

@ -898,8 +898,8 @@ static void sioWrite8inl(u8 data)
if (IS_LAST_BYTE_IN_PACKET != 1) //The following should be set after each byte transfer but the last one. if (IS_LAST_BYTE_IN_PACKET != 1) //The following should be set after each byte transfer but the last one.
sio.StatReg |= ACK_INP; //Signal that Controller (or MC) has brought the /ACK (Acknowledge) line active low. sio.StatReg |= ACK_INP; //Signal that Controller (or MC) has brought the /ACK (Acknowledge) line active low.
sioInterrupt(); sioInterrupt();
//chkTriggerInt(); //chkTriggerInt();
//Console.WriteLn( "SIO0 WR DATA COMMON %02X INT_STAT= %08X IOPpc= %08X " , data, psxHu32(0x1070), psxRegs.pc); //Console.WriteLn( "SIO0 WR DATA COMMON %02X INT_STAT= %08X IOPpc= %08X " , data, psxHu32(0x1070), psxRegs.pc);
byteCnt++; byteCnt++;
} }
@ -910,11 +910,11 @@ void sioStatRead() {
if (clrAckCnt > 1) { //This check can probably be removed... if (clrAckCnt > 1) { //This check can probably be removed...
sio.StatReg &= ~ACK_INP; //clear (goes inactive) /ACK line. sio.StatReg &= ~ACK_INP; //clear (goes inactive) /ACK line.
//sio.StatReg &= ~TX_RDY; // sio.StatReg &= ~TX_RDY;
// sio.StatReg &= ~0x200; //irq // sio.StatReg &= ~0x200; //irq
//if (byteCnt == 1) // if (byteCnt == 1)
// sio.StatReg &= ~RX_RDY; // sio.StatReg &= ~RX_RDY;
clrAckCnt = 0; clrAckCnt = 0;
} }
//The /ACK line should go active for >2us, in a time window between 12us and 100us after each byte is sent (received by the controller). //The /ACK line should go active for >2us, in a time window between 12us and 100us after each byte is sent (received by the controller).
//If that doesn't happen, the controller is considered missing. //If that doesn't happen, the controller is considered missing.

View File

@ -310,7 +310,7 @@ bool SysThreadBase::StateCheckInThread()
m_ExecMode = ExecMode_Closed; m_ExecMode = ExecMode_Closed;
m_RunningLock.Release(); m_RunningLock.Release();
} }
// fallthrough... // Fall through
case ExecMode_Closed: case ExecMode_Closed:
while( m_ExecMode == ExecMode_Closed ) while( m_ExecMode == ExecMode_Closed )

View File

@ -1095,6 +1095,7 @@ int cop2flags(u32 code)
default: default:
break; break;
} }
break;
case 4: // MAXbc case 4: // MAXbc
case 5: // MINbc case 5: // MINbc
case 12: // IADD, ISUB, IADDI case 12: // IADD, ISUB, IADDI