Technical information
Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 42
No. a30
Wrong address calculation
test.s:
--9: int CanGetStatus(int channel) {
prepare {r29,r31},0
--10: int result = flagArray[channel].One;
shl 2,r6
movhi hi(_flagArray),r6,r6
mov r6,r2 <--- r6 is no longer channel * 4
ld.hu lo(_flagArray)[r6],r29
movea lo(_flagArray),r6,r6
--11: if (flagArray[channel].Two)
ld.hu 2[r6],r10
cmp zero,r10
be .L4
--12: result |= 2;
ori 2,r29,r29
br .L6
.L4:
--13: else if ( Register.pModule[channel][0] & 0x0002)
movhi hi(_Register),zero,r8
mov r2,r9 <--- use r2 as if it is channel * 4
add r8,r9
ld.w lo(_Register)[r9],r6
ld.h 0[r6],r6
shr 2,r6
bnl .L7
--14: result |= 8;
ori 8,r29,r29
br .L6
.L7:
--15: else if ( Register.pModule[channel][0] & 0x0800)
movhi hi(_Register),r2,r2
ld.w lo(_Register)[r2],r6
ld.h 0[r6],r6
shr 12,r6
bnl .L6
--16: result |= 4;
ori 4,r29,r29
.L6:
--17: GetPSW();
jarl _GetPSW,lp
--18: return result; }
mov r29,r10
dispose 0,{r29,r31},[lp]
Workaround
A new compiler (PATCH to 3.5.1b4), which fixes this problem, can be downloaded from the NEC
WEB page(s) at http://www.renesas.eu/updates?id=443










