Some cleanup to improve readability.

Remove old compiler hacks that are no longer needed.
Fix up some spacing and comments that hid code.
Fix a critical bug in deprecated plugin peopsSPU.
This commit is contained in:
Sacha 2014-08-13 13:05:33 +10:00
parent c46749f236
commit 9dcaaedf06
3 changed files with 8 additions and 43 deletions

View File

@ -32,8 +32,7 @@ static u32 gifqwc = 0;
static bool gifmfifoirq = false;
static __fi void clearFIFOstuff(bool full) {
if (full) CSRreg.FIFO = CSR_FIFO_FULL;
else CSRreg.FIFO = CSR_FIFO_EMPTY;
CSRreg.FIFO = full ? CSR_FIFO_FULL : CSR_FIFO_EMPTY;
}
void incGifChAddr(u32 qwc) {
@ -155,7 +154,8 @@ static __fi void GIFchain() {
// qwc check now done outside this function
// Voodoocycles
// >> 2 so Drakan and Tekken 5 don't mess up in some PATH3 transfer. Cycles to interrupt were getting huge..
/*if (gifch.qwc)*/ gscycles+= ( _GIFchain() * BIAS); /* guessing */
/*if (gifch.qwc)*/
gscycles+= _GIFchain() * BIAS; /* guessing */
}
static __fi bool checkTieBit(tDMA_TAG* &ptag)
@ -185,7 +185,7 @@ static __fi tDMA_TAG* ReadTag2()
{
tDMA_TAG* ptag = dmaGetAddr(gifch.tadr, false); //Set memory pointer to TADR
gifch.unsafeTransfer(ptag);
gifch.unsafeTransfer(ptag);
gifch.madr = ptag[1]._u32;
gspath3done = hwDmacSrcChainWithStack(gifch, ptag->ID);

View File

@ -89,23 +89,7 @@ typedef uint32 uptr;
using namespace std;
#ifdef _MSC_VER
#if _MSC_VER >= 1500
#include <memory>
#if _MSC_VER < 1600
using namespace std::tr1;
#else
using namespace std;
#endif
#endif
#endif
#ifdef __GNUC__
#include <memory>
#endif
#include <memory>
#ifdef _WINDOWS
@ -126,11 +110,7 @@ using namespace std;
template<> class hash_compare<uint32>
{
public:
#if _MSC_VER >= 1500 && _MSC_VER < 1600
enum {bucket_size = 4, min_buckets = 8};
#else
enum {bucket_size = 1};
#endif
size_t operator()(uint32 key) const
{
@ -153,11 +133,7 @@ using namespace std;
template<> class hash_compare<uint64>
{
public:
#if _MSC_VER >= 1500 && _MSC_VER < 1600
enum {bucket_size = 4, min_buckets = 8};
#else
enum {bucket_size = 1};
#endif
size_t operator()(uint64 key) const
{
@ -253,11 +229,11 @@ struct aligned_free_second {template<class T> void operator()(T& p) {_aligned_fr
#define RESTRICT restrict
#elif _MSC_VER >= 1400
#elif defined(_MSC_VER)
#define RESTRICT __restrict
#elif defined(__GNUC__)
#elif defined(__GNUC__)
#define RESTRICT __restrict__
@ -305,17 +281,6 @@ struct aligned_free_second {template<class T> void operator()(T& p) {_aligned_fr
#define MXCSR (_MM_DENORMALS_ARE_ZERO | _MM_MASK_MASK | _MM_ROUND_NEAREST | _MM_FLUSH_ZERO_ON)
#if defined(_MSC_VER) && _MSC_VER < 1500
__forceinline __m128i _mm_castps_si128(__m128 a) {return *(__m128i*)&a;}
__forceinline __m128 _mm_castsi128_ps(__m128i a) {return *(__m128*)&a;}
__forceinline __m128i _mm_castpd_si128(__m128d a) {return *(__m128i*)&a;}
__forceinline __m128d _mm_castsi128_pd(__m128i a) {return *(__m128d*)&a;}
__forceinline __m128d _mm_castps_pd(__m128 a) {return *(__m128d*)&a;}
__forceinline __m128 _mm_castpd_ps(__m128d a) {return *(__m128*)&a;}
#endif
#define _MM_TRANSPOSE4_SI128(row0, row1, row2, row3) \
{ \
__m128 tmp0 = _mm_shuffle_ps(_mm_castsi128_ps(row0), _mm_castsi128_ps(row1), 0x44); \

View File

@ -117,7 +117,7 @@
#define CALLBACK
#endif
#define Sleep(x) sleep((x)*1000)
#define Sleep(x) usleep((x)*1000)
#endif
////////////////////////////////////////////////////////////////////////