[Patch, Testsuite, ARM] Improve test gcc.target/arm/handler-align.c
Greta Yorsh
Greta.Yorsh@arm.com
Mon Jun 18 15:55:00 GMT 2012
This test checks that the stack pointer is handled correctly in
prologue/epilogue of Cortex-M interrupt handlers. An interrupt handler may
be called when stack is not double-word aligned. The prologue of the
interrupt handler aligns the stack pointer and the epilogue restores the
original stack pointer.
However, in this test, the stack is always double-word aligned when the
handler function foo is called. As a result, the test is not very effective,
for example it passes even if the epilogue does not restore the stack
pointer. This patch forces the stack pointer to be not double-word aligned
on the call to foo.
Tested on qemu -cpu cortex-m3.
Ok for trunk?
Thanks,
Greta
ChangeLog:
gcc/testsuite
2012-06-18 Greta Yorsh <Greta.Yorsh@arm.com>
* gcc.target/arm/handler-align.c (main): Force the stack pointer
to be not double-word aligned on the call to the interrupt handler.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-handler-align.v1.patch.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120618/d549a0d8/attachment.txt>
More information about the Gcc-patches
mailing list