8-byte stack alignment for ARM Cortex-A9

Hello everbody,

as i have written before in "Compability between architecture ARMv5TE and ARMv7-A", we want to change our Platform-Processor from ARM946E-S to an ARM Cortex-A9. The next Point in our risk disclosure ist the stack alignment.

Our Customers have own IEC 61131 Code in compiled form, that cannot be changed. This code can call external functions from our OS, unfortunately with a stackptr, which is not 8-byte aligned. Rarely, but it can happen.

So I've read the support article "Eight-byte Stack Alignment" in the ARM Information Center, where I found the following sentences:

"...Eight-byte stack alignment is of particular benefit to processors supporting LDRD and STRD instructions, for example, processors based on ARM architecture v5TE

and later. If the stack is not eight-byte aligned the use of LDRD and STRD might cause an alignment fault, depending on the target and configuration used"

My questions:

- Are there other instructions besides LDRD and STRD, that can make problems with a NOT 8-byte aligned Pointer? We could scan our externally callable functions for this instructions.

- Is there any support from the processor to handle or correct a misaligned stack pointer, except a manipulation by inline assembler? (I've read about STKALIGN in the ARM Cortex-M processor family)

Thanks und best Regards,


More questions in this forum