[sdiy] Some Audio DSP prototypes

Mike Bryant mbryant at futurehorizons.com
Wed Apr 20 22:53:44 CEST 2022

From: Synth-diy [mailto:synth-diy-bounces at synth-diy.org] On Behalf Of Steve via Synth-diy

>>  You can force it to use registers by setting –O0 but then it doesn’t optimise the logic as you can’t switch optimisation levels inside functions.

Ø  I guess one could refactor something to have the bit that needs this trick as an inline function with a tagged __attribute__((optimize("O0"))) ?
Never tried what happens there with inlines, whether the optimization level of the surrounding function overrides this... but just throwing this into GCC, it doesn't complain about this attribute being moot, like it tends to do when you do pointless stuff.

That doesn’t work I’m afraid.  It ignores it and swaps the register allocations, then in our case runs out of registers so uses a stack access.  I tore my hair out with the RP2040 toolset for several weeks trying to give it a try.  After almost a week of trial and error I eventually managed to get an AES (like SPDIF) receiver only one instruction more than Clang on gcc, but most other stuff was never in the ballpark, hence our use of cut, edit and pasting the assembly output from ARM compiler.  The sooner STM can supply proper MCUs again the better.

> I guess some people don't like being dependent on ever changing terms (read: the whims) of commercial tool vendors when avoidable.
Never understood this myself.  We have to sell our products on performance and if a compiler gives us a competitive advantage we buy it, the same as we use a commercial PCB tool rather than Kicad.  And I’m not aware of any non-commercial EMI simulators, which tends to indicate to me that most people simply ignore EMI compliance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20220420/a3c08a97/attachment.htm>

More information about the Synth-diy mailing list