From: Roland McGrath <roland@hack.frob.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: <libc-ports@sourceware.org>
Subject: Re: [PATCH roland/arm-avoid-pc] ARM_BX_ALIGN_LOG2
Date: Wed, 13 Mar 2013 19:42:00 -0000 [thread overview]
Message-ID: <20130313194152.B5A412C075@topped-with-meat.com> (raw)
In-Reply-To: Joseph S. Myers's message of Tuesday, 12 March 2013 23:40:16 +0000 <Pine.LNX.4.64.1303122339020.6338@digraph.polyomino.org.uk>
> The comment should say that this should only be used in ARM-mode code
> (certainly this definition doesn't make sense by default for code built as
> Thumb). OK with that change.
Well, it makes some sense for any situation doing something like what the
memcpy code is doing (i.e. arithmetically computing branch targets, which
implicitly assumes fixed distance between them). Unless one were
completely sure that each Thumb instruction would always have a short
encoding, then you'd need to explicitly align each one to four.
I've committed it with the following comment.
Feel free to adjust it further as you see fit.
Thanks,
Roland
/* The log2 of the minimum alignment required for an address that
is the target of a computed branch (i.e. a "bx" instruction).
A more-specific arm-features.h file may define this to set a more
stringent requirement.
Using this only makes sense for code in ARM mode (where instructions
always have a fixed size of four bytes), or for Thumb-mode code that is
specifically aligning all the related branch targets to match (since
Thumb instructions might be either two or four bytes). */
next prev parent reply other threads:[~2013-03-13 19:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 20:54 [PATCH roland/arm-avoid-pc] ARM: Support avoiding pc as destination register Roland McGrath
2013-03-11 20:55 ` [PATCH roland/arm-avoid-pc] ARM_BX_ALIGN_LOG2 Roland McGrath
2013-03-12 23:40 ` Joseph S. Myers
2013-03-13 19:42 ` Roland McGrath [this message]
2013-03-12 23:35 ` [PATCH roland/arm-avoid-pc] ARM: Support avoiding pc as destination register Joseph S. Myers
2013-03-13 16:50 ` Roland McGrath
-- strict thread matches above, loose matches on Subject: below --
2013-03-04 23:33 [PATCH roland/arm-avoid-pc] ARM_BX_ALIGN_LOG2 Roland McGrath
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=20130313194152.B5A412C075@topped-with-meat.com \
--to=roland@hack.frob.com \
--cc=joseph@codesourcery.com \
--cc=libc-ports@sourceware.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).