DSPRelated.com
Forums

Re: VDSP 4.0 - ADSP-21369 - optimization while maintaining execution ord

Started by Andrew Nesterov May 22, 2006
Hi Dan,

I would try to separate register inits with commas:

reg0 = val0,
reg1 = val1,
...
regn = valn;

Usually (so far I've never seen a compiler that treat it differently)
this would produce in-order assembly code even with optimization on.

Rgds,

Andrew

> From: "Dan Ash" a...@yahoo.com
> Date: Thu May 18, 2006 2:56pm(PDT)
> Subject: VDSP 4.0 - ADSP-21369 - optimization while maintaining execution ord
>
> Please excuse my rudimentary compiler knowledge.
>
> I am configuring a peripheral from C and it has a DMA feature, there
> are a few register loads, but I want to write to the register to start
> the DMA last.
>
> When I enable optimization using the #pragma, code is optimized such
> that the DMA is started before some of the other peripheral register
> loads are performed afterwords, resulting in failure.
>
> I want optimization and I want my statements executed in order. If no
> pragma or optimization switch, can I do something at the C level
> besides making the enable a function?
>
> thanks,
>
> Dan
>