mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 11:18:36 +12:00
SPU LLVM: LS Memory Mirrors (Optimize loads/stores)
This commit is contained in:
parent
c1a80b8146
commit
af1ceb1151
5 changed files with 104 additions and 31 deletions
|
@ -118,6 +118,11 @@ enum : u32
|
|||
SPU_STATUS_IS_ISOLATED = 0x80,
|
||||
};
|
||||
|
||||
enum : s32
|
||||
{
|
||||
SPU_LS_SIZE = 0x40000,
|
||||
};
|
||||
|
||||
enum : u32
|
||||
{
|
||||
SYS_SPU_THREAD_BASE_LOW = 0xf0000000,
|
||||
|
@ -636,6 +641,7 @@ public:
|
|||
|
||||
const u32 index; // SPU index
|
||||
const u32 offset; // SPU LS offset
|
||||
const std::add_pointer_t<u8> ls; // SPU LS pointer
|
||||
private:
|
||||
lv2_spu_group* const group; // SPU Thread Group (only safe to access in the spu thread itself)
|
||||
public:
|
||||
|
@ -682,7 +688,7 @@ public:
|
|||
template<typename T>
|
||||
inline to_be_t<T>* _ptr(u32 lsa)
|
||||
{
|
||||
return static_cast<to_be_t<T>*>(vm::base(offset + lsa));
|
||||
return reinterpret_cast<to_be_t<T>*>(ls + lsa);
|
||||
}
|
||||
|
||||
// Convert specified SPU LS address to a reference of specified (possibly converted to BE) type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue