Technical information
Operating Precautions for CPDW9X/NT-CDR-V85X, Y-GHS-MULTI-V800
TM
Customer Notification r20tu0003ed1812 71
No. a59
Incorrect conditional branch after tst1
Version Information
V3.5.1, V3.5.1b3, V3.5.1b4
Details
In the example below the compiler uses the wrong branch instruction after a bit test with the tst1
instruction:
int byte, word;
int TestFunk(void)
{
if ((((byte & 1) == 1) == 1) && word)
movhi hi(_byte),zero,r1
tst1 0,lo(_byte)[r1]
setfne r2
bne .L4
movhi hi(_word),zero,r16
ld.w lo(_word)[r16],r16
cmp zero,r16
be .L4
return 5;
mov 5,r10
br .L2
.L4:
else if (((byte & 1) == 1) == 1)
cmp 1,r2
setfne r10
.L2:
return 0;
return 1;
jmp [lp]
}
Command Line
ccv850e -cpu=v850e -Ospace
Workaround
1. The common sub-expression elimination should be disabled (-Onocse)
2. A new compiler update (3.5.1B5) is available for download.










