From: "Bernhard Michael" <michael.bernhard@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Xenomai problems on pxa
Date: Wed, 16 Jan 2008 15:19:28 +0100 [thread overview]
Message-ID: <478E1270.1000409@domain.hid> (raw)
In-Reply-To: <2ff1a98a0801160249t7e4c1989i5ebde8e6b69d52e7@domain.hid>
Gilles Chanteperdrix wrote:
> I do not know how to solve this. From my point of view, this is a
> compiler bug: knowing that it uses instructions which needs 8 bytes
> alignment, the compiler should align stack frames on 8 bytes
> boundaries, period.
Digging a bit in the mailing lists about stack alignment and EABI I find
that gcc *realy* should handle proper stack alignment.
See http://gcc.gnu.org/ml/gcc/2006-07/msg00030.html
or http://www.codesourcery.com/archives/arm-gnu/msg01467.html
Now, looking at the assembly code for the SWI handler, I see that ipipe
introduces flowing code:
#ifdef CONFIG_IPIPE
stmfd sp!, {r0-r3, ip}
add r1, sp, #S_OFF
add r1, r1, #20
mov r0, scno
bl __ipipe_syscall_root
cmp r0, #0
ldmfd sp!, {r0-r3, ip}
blt __ipipe_ret_fast_syscall
bgt __ipipe_fast_exit_syscall
#endif /* CONFIG_IPIPE */
Assuming that the stack was properly aligned before this code snipped
the first instruction moves 20 bytes onto the stack. 20 modulo 8 = 4 which
means, the stack is not 8-byte aligned any more. This could be the reason
why the strd/ldrd instructions are failing later.
I can't verify this on hardware now but I'll do it for sure.
--
Michael
next prev parent reply other threads:[~2008-01-16 14:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-12 19:35 [Xenomai-help] Xenomai problems on pxa Bernhard Michael
2008-01-14 13:25 ` Gilles Chanteperdrix
2008-01-14 15:39 ` Bernhard Michael
2008-01-14 15:52 ` Gilles Chanteperdrix
2008-01-15 10:28 ` Bernhard Michael
2008-01-15 10:29 ` Gilles Chanteperdrix
2008-01-15 12:47 ` Bernhard Michael
2008-01-15 13:09 ` Gilles Chanteperdrix
2008-01-15 14:03 ` Bernhard Michael
2008-01-15 14:10 ` Gilles Chanteperdrix
2008-01-16 10:14 ` Bernhard Michael
2008-01-16 10:49 ` Gilles Chanteperdrix
2008-01-16 14:19 ` Bernhard Michael [this message]
2008-01-16 14:35 ` Gilles Chanteperdrix
2008-01-16 17:30 ` Gilles Chanteperdrix
2008-01-17 13:02 ` Bernhard Michael
2008-01-17 13:23 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=478E1270.1000409@domain.hid \
--to=michael.bernhard@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.