public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/67366] Poor assembly generation for unaligned memory accesses on ARM v6 & v7 cpus
Date: Thu, 27 Aug 2015 10:42:00 -0000	[thread overview]
Message-ID: <bug-67366-4-2rC42HMamN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-67366-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67366

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ramana at gcc dot gnu.org

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Richard Earnshaw from comment #2)
> (In reply to Richard Biener from comment #1)
> > I think this boils down to the fact that memcpy expansion is done too late
> > and
> > that (with more recent GCC) the "inlining" done on the GIMPLE level is
> > restricted
> > to !SLOW_UNALIGNED_ACCESS but arm defines STRICT_ALIGNMENT to 1
> > unconditionally.
> > 
> 
> Yep, we have to define STRICT_ALIGNMENT to 1 because not all load
> instructions work with misaligned addresses (ldm, for example).  The only
> way to handle misaligned copies is through the movmisalign API.

Hmmm, actually that's not completely true - for SImode and HImode objects there
don't appear to be movmisalign interfaces. For things like memcpy this is done
through the memcpy interface where we end up generating copies using
unaligned_loadsi and unaliged_storesi.

We may need to experiment a bit with the movmisalign interface too.


Ramana


  parent reply	other threads:[~2015-08-27 10:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 21:42 [Bug c/67366] New: " yann.collet.73 at gmail dot com
2015-08-27  7:39 ` [Bug target/67366] " rguenth at gcc dot gnu.org
2015-08-27  9:36 ` rearnsha at gcc dot gnu.org
2015-08-27 10:21 ` rguenther at suse dot de
2015-08-27 10:42 ` ramana at gcc dot gnu.org [this message]
2015-08-27 10:47 ` ramana at gcc dot gnu.org
2015-08-27 11:08 ` ramana at gcc dot gnu.org
2015-08-27 11:13 ` rguenther at suse dot de
2015-08-27 11:17 ` ramana at gcc dot gnu.org
2015-08-27 14:31 ` rearnsha at gcc dot gnu.org
2015-08-27 14:36 ` rguenther at suse dot de
2015-08-27 14:45 ` ramana at gcc dot gnu.org
2015-09-09 15:28 ` ramana at gcc dot gnu.org
2015-10-09 11:08 ` ramana at gcc dot gnu.org
2015-10-11 10:33 ` fredrik.hederstierna@securitas-direct.com
2015-10-13  9:16 ` ramana at gcc dot gnu.org

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=bug-67366-4-2rC42HMamN@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).