mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Minor bugfix, cleanup
This commit is contained in:
parent
3bc6c53eb3
commit
a8fcf71f9c
9 changed files with 205 additions and 184 deletions
|
|
@ -32,6 +32,14 @@ namespace vm
|
|||
page_allocated = (1 << 7),
|
||||
};
|
||||
|
||||
// This flag is changed by various reservation functions and may have different meaning.
|
||||
// reservation_break() - true if the reservation was successfully broken.
|
||||
// reservation_acquire() - true if another existing reservation was broken.
|
||||
// reservation_free() - true if this thread's reservation was successfully removed.
|
||||
// reservation_op() - false if reservation_update() would succeed if called instead.
|
||||
// Write access to reserved memory - only set to true if the reservation was broken.
|
||||
extern thread_local bool g_tls_did_break_reservation;
|
||||
|
||||
// Unconditionally break the reservation at specified address
|
||||
void reservation_break(u32 addr);
|
||||
|
||||
|
|
@ -208,9 +216,9 @@ namespace vm
|
|||
return cast_ptr<T>::cast(addr, file, line, func);
|
||||
}
|
||||
|
||||
static u8 read8(u32 addr)
|
||||
static const u8& read8(u32 addr)
|
||||
{
|
||||
return get_ref<u8>(addr);
|
||||
return get_ref<const u8>(addr);
|
||||
}
|
||||
|
||||
static void write8(u32 addr, u8 value)
|
||||
|
|
@ -232,11 +240,6 @@ namespace vm
|
|||
get_ref<be_t<u16>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write16(u32 addr, u16 value)
|
||||
{
|
||||
get_ref<be_t<u16>>(addr) = value;
|
||||
}
|
||||
|
||||
inline const be_t<u32>& read32(u32 addr)
|
||||
{
|
||||
return get_ref<const be_t<u32>>(addr);
|
||||
|
|
@ -247,11 +250,6 @@ namespace vm
|
|||
get_ref<be_t<u32>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write32(u32 addr, u32 value)
|
||||
{
|
||||
get_ref<be_t<u32>>(addr) = value;
|
||||
}
|
||||
|
||||
inline const be_t<u64>& read64(u32 addr)
|
||||
{
|
||||
return get_ref<const be_t<u64>>(addr);
|
||||
|
|
@ -262,11 +260,6 @@ namespace vm
|
|||
get_ref<be_t<u64>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write64(u32 addr, u64 value)
|
||||
{
|
||||
get_ref<be_t<u64>>(addr) = value;
|
||||
}
|
||||
|
||||
inline const be_t<u128>& read128(u32 addr)
|
||||
{
|
||||
return get_ref<const be_t<u128>>(addr);
|
||||
|
|
@ -276,11 +269,6 @@ namespace vm
|
|||
{
|
||||
get_ref<be_t<u128>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write128(u32 addr, u128 value)
|
||||
{
|
||||
get_ref<be_t<u128>>(addr) = value;
|
||||
}
|
||||
}
|
||||
|
||||
namespace psv
|
||||
|
|
@ -297,11 +285,6 @@ namespace vm
|
|||
get_ref<le_t<u16>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write16(u32 addr, u16 value)
|
||||
{
|
||||
get_ref<le_t<u16>>(addr) = value;
|
||||
}
|
||||
|
||||
inline const le_t<u32>& read32(u32 addr)
|
||||
{
|
||||
return get_ref<const le_t<u32>>(addr);
|
||||
|
|
@ -312,11 +295,6 @@ namespace vm
|
|||
get_ref<le_t<u32>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write32(u32 addr, u32 value)
|
||||
{
|
||||
get_ref<le_t<u32>>(addr) = value;
|
||||
}
|
||||
|
||||
inline const le_t<u64>& read64(u32 addr)
|
||||
{
|
||||
return get_ref<const le_t<u64>>(addr);
|
||||
|
|
@ -327,11 +305,6 @@ namespace vm
|
|||
get_ref<le_t<u64>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write64(u32 addr, u64 value)
|
||||
{
|
||||
get_ref<le_t<u64>>(addr) = value;
|
||||
}
|
||||
|
||||
inline const le_t<u128>& read128(u32 addr)
|
||||
{
|
||||
return get_ref<const le_t<u128>>(addr);
|
||||
|
|
@ -341,11 +314,6 @@ namespace vm
|
|||
{
|
||||
get_ref<le_t<u128>>(addr) = value;
|
||||
}
|
||||
|
||||
inline void write128(u32 addr, u128 value)
|
||||
{
|
||||
get_ref<le_t<u128>>(addr) = value;
|
||||
}
|
||||
}
|
||||
|
||||
namespace psp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue