Search
lxdream.org :: lxdream :: r1230:64a91ef571fc
lxdream 0.9.1
released Jun 29
Download Now
changeset1230:64a91ef571fc
parent1202:01ae5cbad4c8
child1231:d63c808ddcd3
authorNathan Keynes <nkeynes@lxdream.org>
dateThu Dec 29 15:41:56 2011 +1000 (7 years ago)
Fix emu sign-extension of MULS.W instruction
Change emu FMAC to match translator precision
src/sh4/sh4core.in
1.1 --- a/src/sh4/sh4core.in Fri Dec 23 08:20:17 2011 +1000
1.2 +++ b/src/sh4/sh4core.in Thu Dec 29 15:41:56 2011 +1000
1.3 @@ -723,7 +723,7 @@
1.4 :}
1.5 MULS.W Rm, Rn {:
1.6 sh4r.mac = (sh4r.mac&0xFFFFFFFF00000000LL) |
1.7 - (uint32_t)(SIGNEXT32(sh4r.r[Rm]&0xFFFF) * SIGNEXT32(sh4r.r[Rn]&0xFFFF));
1.8 + (uint32_t)(SIGNEXT32((int16_t)(sh4r.r[Rm])) * SIGNEXT32((int16_t)(sh4r.r[Rn])));
1.9 :}
1.10 NEGC Rm, Rn {:
1.11 tmp = 0 - sh4r.r[Rm];
1.12 @@ -1248,7 +1248,7 @@
1.13 if( IS_FPU_DOUBLEPREC() ) {
1.14 DR(FRn) += DR(FRm)*DR(0);
1.15 } else {
1.16 - FR(FRn) += FR(FRm)*FR(0);
1.17 + FR(FRn) += (double)FR(FRm)*(double)FR(0);
1.18 }
1.19 :}
1.20 FRCHG {:
.