Search
lxdream.org :: lxdream :: r1193:dff55bdc4f46
lxdream 0.9.1
released Jun 29
Download Now
changeset1193:dff55bdc4f46
parent1192:ba3df0bf2c23
child1194:ee6ce5804608
authornkeynes
dateMon Dec 12 21:10:04 2011 +1000 (8 years ago)
Fix MAC.W operand ordering - reads from Rn first, then Rm (per the manual)
src/sh4/sh4core.in
src/sh4/sh4x86.in
1.1 --- a/src/sh4/sh4core.in Mon Dec 12 09:54:27 2011 +1000
1.2 +++ b/src/sh4/sh4core.in Mon Dec 12 21:10:04 2011 +1000
1.3 @@ -665,9 +665,9 @@
1.4 sh4r.r[Rn] += 4;
1.5 } else {
1.6 CHECKRALIGN16( sh4r.r[Rn] );
1.7 - CHECKRALIGN16( sh4r.r[Rm] );
1.8 MEM_READ_WORD(sh4r.r[Rn], tmp);
1.9 stmp = SIGNEXT16(tmp);
1.10 + CHECKRALIGN16( sh4r.r[Rm] );
1.11 MEM_READ_WORD(sh4r.r[Rm], tmp);
1.12 stmp = stmp * SIGNEXT16(tmp);
1.13 sh4r.r[Rn] += 2;
2.1 --- a/src/sh4/sh4x86.in Mon Dec 12 09:54:27 2011 +1000
2.2 +++ b/src/sh4/sh4x86.in Mon Dec 12 21:10:04 2011 +1000
2.3 @@ -1158,11 +1158,11 @@
2.4 // Note translate twice in case of page boundaries. Maybe worth
2.5 // adding a page-boundary check to skip the second translation
2.6 } else {
2.7 - load_reg( REG_EAX, Rm );
2.8 + load_reg( REG_EAX, Rn );
2.9 check_ralign16( REG_EAX );
2.10 MEM_READ_WORD( REG_EAX, REG_EAX );
2.11 MOVL_r32_rspdisp( REG_EAX, 0 );
2.12 - load_reg( REG_EAX, Rn );
2.13 + load_reg( REG_EAX, Rm );
2.14 check_ralign16( REG_EAX );
2.15 MEM_READ_WORD( REG_EAX, REG_EAX );
2.16 ADDL_imms_rbpdisp( 2, REG_OFFSET(r[Rn]) );
.