Search
lxdream.org :: lxdream/src/sh4/sh4core.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/sh4core.in
changeset 970:44d62d0850c8
prev953:f4a156508ad1
next974:16b079ed11bb
author nkeynes
date Thu Jan 22 00:50:09 2009 +0000 (11 years ago)
permissions -rw-r--r--
last change Fix Post-increment mov instructions - per the manual, increment doesn't happen if the
source and target registers are the same.
file annotate diff log raw
1.1 --- a/src/sh4/sh4core.in Tue Jan 13 11:56:28 2009 +0000
1.2 +++ b/src/sh4/sh4core.in Thu Jan 22 00:50:09 2009 +0000
1.3 @@ -335,9 +335,9 @@
1.4 MOV.B Rm, @-Rn {: sh4r.r[Rn]--; :}
1.5 MOV.W Rm, @-Rn {: sh4r.r[Rn] -= 2; :}
1.6 MOV.L Rm, @-Rn {: sh4r.r[Rn] -= 4; :}
1.7 -MOV.B @Rm+, Rn {: sh4r.r[Rm] ++; :}
1.8 -MOV.W @Rm+, Rn {: sh4r.r[Rm] += 2; :}
1.9 -MOV.L @Rm+, Rn {: sh4r.r[Rm] += 4; :}
1.10 +MOV.B @Rm+, Rn {: if( Rm != Rn ) { sh4r.r[Rm] ++; } :}
1.11 +MOV.W @Rm+, Rn {: if( Rm != Rn ) { sh4r.r[Rm] += 2; } :}
1.12 +MOV.L @Rm+, Rn {: if( Rm != Rn ) { sh4r.r[Rm] += 4; } :}
1.13 %%
1.14 sh4r.pc += 2;
1.15 sh4r.new_pc = sh4r.pc+2;
1.16 @@ -538,9 +538,9 @@
1.17 MOV.W @Rm, Rn {: CHECKRALIGN16( sh4r.r[Rm] ); MEM_READ_WORD( sh4r.r[Rm], sh4r.r[Rn] ); :}
1.18 MOV.L @Rm, Rn {: CHECKRALIGN32( sh4r.r[Rm] ); MEM_READ_LONG( sh4r.r[Rm], sh4r.r[Rn] ); :}
1.19 MOV Rm, Rn {: sh4r.r[Rn] = sh4r.r[Rm]; :}
1.20 - MOV.B @Rm+, Rn {: MEM_READ_BYTE( sh4r.r[Rm], sh4r.r[Rn] ); sh4r.r[Rm] ++; :}
1.21 - MOV.W @Rm+, Rn {: CHECKRALIGN16( sh4r.r[Rm] ); MEM_READ_WORD( sh4r.r[Rm], sh4r.r[Rn] ); sh4r.r[Rm] += 2; :}
1.22 - MOV.L @Rm+, Rn {: CHECKRALIGN32( sh4r.r[Rm] ); MEM_READ_LONG( sh4r.r[Rm], sh4r.r[Rn] ); sh4r.r[Rm] += 4; :}
1.23 + MOV.B @Rm+, Rn {: MEM_READ_BYTE( sh4r.r[Rm], sh4r.r[Rn] ); if( Rm != Rn ) { sh4r.r[Rm] ++; } :}
1.24 + MOV.W @Rm+, Rn {: CHECKRALIGN16( sh4r.r[Rm] ); MEM_READ_WORD( sh4r.r[Rm], sh4r.r[Rn] ); if( Rm != Rn ) { sh4r.r[Rm] += 2; } :}
1.25 + MOV.L @Rm+, Rn {: CHECKRALIGN32( sh4r.r[Rm] ); MEM_READ_LONG( sh4r.r[Rm], sh4r.r[Rn] ); if( Rm != Rn ) { sh4r.r[Rm] += 4; } :}
1.26 MOV.L @(disp, PC), Rn {:
1.27 CHECKSLOTILLEGAL();
1.28 tmp = (pc&0xFFFFFFFC) + disp + 4;
.