From: notaz Date: Tue, 9 Dec 2014 21:36:05 +0000 (+0200) Subject: psxinterpreter: don't break strict aliasing rules X-Git-Tag: r20~32 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1ba08510c208685fda8a0a2d0e2b72d98db23b1;p=pcsx_rearmed.git psxinterpreter: don't break strict aliasing rules --- diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c index ff494913..cf3de798 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 };