/* LDC Rm,SR */\r
INLINE void LDCSR(UINT32 m)\r
{\r
- sh2->sr = sh2->r[m] & FLAGS;\r
+ sh2->sr &= ~0xfff;\r
+ sh2->sr |= sh2->r[m] & FLAGS;\r
sh2->test_irq = 1;\r
}\r
\r
INLINE void LDCMSR(UINT32 m)\r
{\r
sh2->ea = sh2->r[m];\r
- sh2->sr = RL( sh2->ea ) & FLAGS;\r
+ sh2->sr &= ~0xfff;\r
+ sh2->sr |= RL( sh2->ea ) & FLAGS;\r
sh2->r[m] += 4;\r
sh2_icount -= 2;\r
sh2->test_irq = 1;\r
sh2->pc = RL( sh2->ea );\r
sh2->r[15] += 4;\r
sh2->ea = sh2->r[15];\r
- sh2->sr = RL( sh2->ea ) & FLAGS;\r
+ sh2->sr &= ~0xfff;\r
+ sh2->sr |= RL( sh2->ea ) & FLAGS;\r
sh2->r[15] += 4;\r
sh2_icount -= 3;\r
sh2->test_irq = 1;\r
/* STC SR,Rn */\r
INLINE void STCSR(UINT32 n)\r
{\r
- sh2->r[n] = sh2->sr;\r
+ sh2->r[n] = sh2->sr & FLAGS;\r
}\r
\r
/* STC GBR,Rn */\r
{\r
sh2->r[n] -= 4;\r
sh2->ea = sh2->r[n];\r
- WL( sh2->ea, sh2->sr );\r
+ WL( sh2->ea, sh2->sr & FLAGS );\r
sh2_icount--;\r
}\r
\r
sh2->ea = sh2->vbr + imm * 4;\r
\r
sh2->r[15] -= 4;\r
- WL( sh2->r[15], sh2->sr );\r
+ WL( sh2->r[15], sh2->sr & FLAGS );\r
sh2->r[15] -= 4;\r
WL( sh2->r[15], sh2->pc );\r
\r