[Sound-open-firmware] Stack alignment issues with XCC?

Paul Olaru paul.olaru at nxp.com
Tue Nov 19 16:33:48 CET 2019


Hello, I'm trying to begin doing all my builds with XCC for testing and, besides one issue where I need to
manually insert stack alignment code in the IRQ handling function for the DMA domain it seems to work.
Also, if I align the stack within my IRQ_STEER handler it remains aligned for the domain handler just fine.

My question is, why within irq_handler (see src/drivers/imx/interrupt.c, function begins around line 275)
the stack is not aligned? Did you also encounter this issue on other platforms? And is there any good
solution other than that bit of inline assembly that just force-aligns the stack pointer when entering the
cascaded IRQ handler?

Without this code I seem to get panics with an alignment exception, the address pointing within an
Interrupt stack and epc0 not being correct (I think I need to investigate that as well but that's a
low-priority issue).

Compiler version for reference (in case there is a known issue I'm not aware of):

xt-xcc -v
xt-xcc version 11.0.4
Thread model: single


More information about the Sound-open-firmware mailing list