Technical information
Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 40
test.s:
void SetBit(unsigned char Index)
{
0x10a0 SetBit: 0086 zxb r6
if ((Index) & (0x01))
0x10a2 SetBit+0x2: 86c60001 andi 0x1, r6, r16
0x10a6 SetBit+0x6: 0dd2 be SetBit+0x20 (0x10c0)
{
Buffer |= ((1 << ((Index - 1) >> 1)) << 4) ;
0x10a8 SetBit+0x8: 56060001 addi 1, r6, r10
<--- wrong calculation, should be "addi -1, r6, r10"
0x10ac SetBit+0xc: 52a1 sar 1, r10
0x10ae SetBit+0xe: 52c4 shl 4, r10
0x10b0 SetBit+0x10: 16400030 movhi 0x30, zero, r2
<--- shift left missing
0x10b4 SetBit+0x14: 8f820105 ld.bu 0x104[r2], r17
0x10b8 SetBit+0x18: 16220104 movea 0x104, r2, r2
0x10bc SetBit+0x1c: 890a or r10, r17
0x10be SetBit+0x1e: 0dc5 br SetBit+0x36 (0x10d6)
}
else
{
Buffer |= (1 << (Index >> 1)) ;
0x10c0 SetBit+0x20: 32a1 sar 1, r6
0x10c2 SetBit+0x22: 7201 mov 1, r14
0x10c4 SetBit+0x24: 77e600c0 shl r6, r14
0x10c8 SetBit+0x28: 16400030 movhi 0x30, zero, r2
0x10cc SetBit+0x2c: 8f820105 ld.bu 0x104[r2], r17
0x10d0 SetBit+0x30: 16220104 movea 0x104, r2, r2
0x10d4 SetBit+0x34: 890e or r14, r17
0x10d6 SetBit+0x36: 8f420000 st.b r17, 0[r2]
}
}
0x10da SetBit+0x3a: 007f jmp [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










