1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

fix small mistakes

fix endian mistakes, mistaken word length and preprocessor mistake
This commit is contained in:
Peter Tissen 2014-02-28 19:34:50 +01:00
parent 681c3c53f0
commit dbc39bce40
3 changed files with 6 additions and 5 deletions

View File

@ -50,10 +50,11 @@ class be_t
public:
typedef T type;
#ifdef __GNUG__
#ifdef _WIN32
be_t(){}
#else
be_t() noexcept = default
#endif
be_t(){}
be_t(const T& value)
{

View File

@ -15,5 +15,5 @@
#define InterlockedCompareExchange64(ptr,new_val,old_val) __sync_val_compare_and_swap(ptr,old_val,new_val)
#define _aligned_malloc(size,alignment) aligned_alloc(alignment,size)
#define _aligned_free(pointer) free(pointer)
#define DWORD int64_t
#define DWORD int32_t
#endif

View File

@ -2665,7 +2665,7 @@ private:
if (lock.tid == reservation.owner && reservation.addr == addr && reservation.size == 4)
{
// Memory.Write32(addr, CPU.GPR[rs]);
CPU.SetCR_EQ(0, InterlockedCompareExchange((volatile long*)(Memory + addr), (u32)CPU.GPR[rs], reservation.data32) == reservation.data32);
CPU.SetCR_EQ(0, InterlockedCompareExchange((volatile long*) (Memory + addr), re((u32) CPU.GPR[rs]), re(reservation.data32)) == re(reservation.data32));
reservation.clear();
}
else
@ -2718,7 +2718,7 @@ private:
if (lock.tid == reservation.owner && reservation.addr == addr && reservation.size == 8)
{
// Memory.Write64(addr, CPU.GPR[rs]);
CPU.SetCR_EQ(0, InterlockedCompareExchange64((volatile long long*)(Memory + addr), CPU.GPR[rs], reservation.data64) == reservation.data64);
CPU.SetCR_EQ(0, InterlockedCompareExchange64((volatile long long*)(Memory + addr), re(CPU.GPR[rs]), re(reservation.data64)) == re(reservation.data64));
reservation.clear();
}
else