From: "Paweł Sikora" <pluto@agmk.net>
To: gcc@gcc.gnu.org
Subject: (un)aligned accesses on x86 platform.
Date: Mon, 08 Mar 2010 15:37:00 -0000 [thread overview]
Message-ID: <op.u889o5kpzu3k57@pawels.alatek.krakow.pl> (raw)
hi,
during development a cross platform appliacation on x86 workstation
i've enabled an alignemnt checking [1] to catch possible erroneous
code before it appears on client's sparc/arm cpu with sigbus ;)
it works pretty fine and catches alignment violations but Jakub Jelinek
had told me (on glibc bugzilla) that gcc on x86 can still dereference
an unaligned pointer (except for vector insns).
i suppose it means that gcc can emit e.g. movl for access a short int
(or maybe others scenarios) in some cases and violates cpu alignment rules.
so, is it possible to instruct gcc-x86 to always use suitable loads/stores
like on sparc/arm?
[1] "AC" bit - http://en.wikipedia.org/wiki/FLAGS_register_(computing)
BR,
Pawel.
next reply other threads:[~2010-03-08 15:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 15:37 Paweł Sikora [this message]
2010-03-08 15:45 ` Andrew Pinski
2010-03-08 15:46 ` Richard Guenther
2010-03-08 21:11 ` Paweł Sikora
2010-03-16 15:05 ` H.J. Lu
2010-03-16 15:11 ` Tristan Gingold
2010-03-16 15:48 ` Alexey Salmin
2010-03-16 16:02 ` Tristan Gingold
2010-03-16 16:08 ` Alexey Salmin
2010-03-16 16:16 ` Piotr Wyderski
2010-03-16 18:31 ` Jakub Jelinek
2010-03-17 15:43 ` Mikael Pettersson
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=op.u889o5kpzu3k57@pawels.alatek.krakow.pl \
--to=pluto@agmk.net \
--cc=gcc@gcc.gnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).