I'm using the following options with cl55.exe (version 4.3.9)
-vcore:2 -vcore:3 -g -O2
The target is the C5505 (TMS320C5505AZCHA12). I'm compiling with -vcore:2 and -vcore:3 because we have to link with an existing library.
If I have the following code :
===================================================
Uint16 tmp, *cmdPtr = (Uint16 *)0x400000; // pointer to external memory
tmp = *cmdPtr++ >> 8;
===================================================
then tmp contains 0 in a lot of cases even when the upper 16 bits of the data pointed to by the pointer is non-zero. The same code on a 5507 produces an output which works.
Replacing
tmp = *cmdPtr++ >> 8;
with
tmp = *cmdPtr++;
tmp >>= 8;
produces the correct result in tmp.
The problem syntax occurs a LOT in my project. Has anyone seen this and know how I can fix it without replacing everything occurence in the project? I can provide the disassembly but I don't see how this will help. The compiler output is clearly wrong.
Thanks in advance,
Cameron.