mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
fix small mistakes
fix endian mistakes, mistaken word length and preprocessor mistake
This commit is contained in:
parent
681c3c53f0
commit
dbc39bce40
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user