We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I'm trying to optimize DSP functions to use them in my cortex M3 MCU. I use the Keil compiler and I want to work with inline assembler, but the Keil compiler don't support the inline assembler in thumb mode. Could anybody help me to find a workaround of this issue. Thanks.
Best Regards
Could anybody help me to find a workaround of this issue.
Well, an obvious workaround would be to put the assembly functions into their own, separate assembly file instead of using inline assembly.
But then again, I've had a really hard time trying to beat the compiler at optimizing ARM code. The whole architecture just lends itself very well to using compiled code instead of hand-crafted assembly. Things are completely different for other, "real" DSP architectures where the compiler is completely unaware of half of the CPUs instructions (usually those that make DSP really fast).
"I'm trying to optimize DSP functions..."
In what way(s) do you find the compiler's generated code to be sub-optimal?
Another "workaround" would be using the embedded assembler (which does support ARM and THUMB code) instead the inline assembler (which only supports ARM.
Refer to the compiler manual about this.
Hi,
I want to use the ssat instruction for saturation. In fact this allow to gain few cycles in a single saturation but in a whole DSP program this become significantly.
Best regards sword_82