mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Extend ppu_decoder/spu_decoder templates
Automatically dereference pointers
This commit is contained in:
parent
1193ab0b89
commit
bebb1bdeda
2 changed files with 28 additions and 0 deletions
|
@ -83,6 +83,20 @@ class ppu_decoder
|
|||
u32 value;
|
||||
T pointer;
|
||||
u32 magn; // Non-zero for "columns" (effectively, number of most significant bits "eaten")
|
||||
|
||||
instruction_info(u32 v, T p, u32 m = 0)
|
||||
: value(v)
|
||||
, pointer(p)
|
||||
, magn(m)
|
||||
{
|
||||
}
|
||||
|
||||
instruction_info(u32 v, const T* p, u32 m = 0)
|
||||
: value(v)
|
||||
, pointer(*p)
|
||||
, magn(m)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// Fill lookup table
|
||||
|
|
|
@ -52,6 +52,20 @@ class spu_decoder
|
|||
u32 magn; // Count = 2 ^ magn
|
||||
u32 value;
|
||||
T pointer;
|
||||
|
||||
instruction_info(u32 m, u32 v, T p)
|
||||
: magn(m)
|
||||
, value(v)
|
||||
, pointer(p)
|
||||
{
|
||||
}
|
||||
|
||||
instruction_info(u32 m, u32 v, const T* p)
|
||||
: magn(m)
|
||||
, value(v)
|
||||
, pointer(*p)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue