mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 11:18:36 +12:00
cast_armv7_gpr added
This commit is contained in:
parent
6ec6303933
commit
c4558d2ca7
6 changed files with 203 additions and 42 deletions
|
@ -568,3 +568,22 @@ struct cast_ppu_gpr<vm::ps3::ptr<T, lvl, AT>, false>
|
|||
return vm::ps3::ptr<T, lvl, AT>::make(cast_ppu_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
}
|
||||
};
|
||||
|
||||
// external specializations for ARMv7 GPR
|
||||
|
||||
template<typename T, bool is_enum>
|
||||
struct cast_armv7_gpr;
|
||||
|
||||
template<typename T, int lvl, typename AT>
|
||||
struct cast_armv7_gpr<vm::psv::ptr<T, lvl, AT>, false>
|
||||
{
|
||||
__forceinline static u32 to_gpr(const vm::psv::ptr<T, lvl, AT>& value)
|
||||
{
|
||||
return value.addr();
|
||||
}
|
||||
|
||||
__forceinline static vm::psv::ptr<T, lvl, AT> from_gpr(const u32 reg)
|
||||
{
|
||||
return vm::psv::ptr<T, lvl, AT>::make(cast_armv7_gpr<AT, std::is_enum<AT>::value>::from_gpr(reg));
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue