mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-04 18:25:27 +02:00
mips: Improve MOVP2R() typesafety.
This commit is contained in:
1 parent
74ef968503
commit
231d4a3da2
1 file changed
+5
-1
@@ -228,7 +228,11 @@ public:
|
||||
MOVI2R(reg, (u32)val);
|
||||
}
|
||||
template <class T> void MOVP2R(MIPSReg reg, T *val) {
|
||||
MOVI2R(reg, (intptr_t)(const void *)val);
|
||||
if (sizeof(uintptr_t) > sizeof(u32)) {
|
||||
MOVI2R(reg, (u64)(intptr_t)(const void *)val);
|
||||
} else {
|
||||
MOVI2R(reg, (u32)(intptr_t)(const void *)val);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in new issue
Block a user