We use the following environment:
OS: Windows XP (newest service packs)
CCS: V3.3.82.13
Code Generation Tools: V5.2.5
Target DSP: TMS320F2808
Problem:
After a IQMultiply the result is compared if result is smaller than the smallest possible value (MIN_IQ_POS). If true the result should be set to MIN_IQ_POS. This operation fails. Altough the result after IQMultiply is 0 the compare thinks it is not.
The settings for compiler are:
-g -k -o2 -eaasmc -fr"$(Proj_dir)\Release" -fs"$(Proj_dir)\Release" -i"$(Proj_dir)\Includes\" -i"$(Proj_dir)" -d"LARGE_MODEL" -ml -v28 --flash_prefetch_warn
The settings for the linker are:
-c -ecode_start -m".\Release\Test.map" -o".\Release\Test.out" -stack0x400 -w -x -i"$(Proj_dir)\Includes\" -l"rts2800_ml.lib" -l"REmath.lib" --xml_link_info="test.xml"
GLOBAL_Q is set to 24.
The screenshot below shows all the registers.
The problem is that the flags "N" and "Z" are affected by the whole "ACC:P" Register and not only by "ACC". "ACC" actually holds the result (0) and "P" holds the residual value. If the optimizer is switched off the operation succeeds.
I'm quite shure this is a compiler bug. Is there any workaround? Are other operations affected?
Thanks for the support.