This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Loop unrolling seems to produce faulty code

hello there

depending on whether loop unrolling is enabled or disabled, code in the attached source file either passes or fails. if i disable loop unrolling using

#pragma UNROLL(1)

i get the expected results, otherwise it fails. i cannot see anything obvioulsy wrong in the code (except that it is ugly due to being stripped down to minimize the test case), so i reckon it must be a code generation bug?

the version of my tools is v6.1.19, the platform is the C64+, and i pass in the following options for the compile step:

--silicon_version=64+ --sat_reassoc=off --fp_reassoc=on --fp_mode=strict --gen_func_subsections --mem_model:const=far --mem_model:data=far --std_lib_func_not_defined --output_all_syms --preproc_with_compile --symdebug:none -O3

and the following options for the link step

--run_linker --absolute_exe --map_file=test_convencoder.map --verbose_diagnostics --disable_auto_rts --warn_sections --reread_libs --rom_model

i don't specify the include paths and library paths since your mileage will vary anyway.

it would be great if someone at TI could look at this and confirm it's a bug. thanks!

 

cheers,

sam

conv.cpp