aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2014-12-09 23:36:05 +0200
committernotaz2014-12-20 02:57:25 +0200
commitb1ba08510c208685fda8a0a2d0e2b72d98db23b1 (patch)
tree53fc26813faad750f7fa8fa3f2517f674734ae3e
parentbcfc48e326fd502e77654330ce4b902e7db8c2dc (diff)
downloadpcsx_rearmed-b1ba08510c208685fda8a0a2d0e2b72d98db23b1.tar.gz
pcsx_rearmed-b1ba08510c208685fda8a0a2d0e2b72d98db23b1.tar.bz2
pcsx_rearmed-b1ba08510c208685fda8a0a2d0e2b72d98db23b1.zip
psxinterpreter: don't break strict aliasing rules
-rw-r--r--libpcsxcore/psxinterpreter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c
index ff49491..cf3de79 100644
--- a/libpcsxcore/psxinterpreter.c
+++ b/libpcsxcore/psxinterpreter.c
@@ -727,9 +727,9 @@ void psxLWR() {
*/
}
-void psxSB() { psxMemWrite8 (_oB_, _u8 (_rRt_)); }
-void psxSH() { psxMemWrite16(_oB_, _u16(_rRt_)); }
-void psxSW() { psxMemWrite32(_oB_, _u32(_rRt_)); }
+void psxSB() { psxMemWrite8 (_oB_, _rRt_ & 0xff); }
+void psxSH() { psxMemWrite16(_oB_, _rRt_ & 0xffff); }
+void psxSW() { psxMemWrite32(_oB_, _rRt_); }
u32 SWL_MASK[4] = { 0xffffff00, 0xffff0000, 0xff000000, 0 };
u32 SWL_SHIFT[4] = { 24, 16, 8, 0 };