linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: teach __asmeq that r11 == fp and r12 == ip
Date: Fri, 30 Jan 2015 10:18:21 +0000	[thread overview]
Message-ID: <20150130101821.GI26493@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAKv+Gu-z6ZNcYgbxyVJpUtkwhY-dq2h_7-ivZa_Qzg8PW-77Gw@mail.gmail.com>

On Fri, Jan 30, 2015 at 07:21:18AM +0000, Ard Biesheuvel wrote:
> On 29 January 2015 at 11:48, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Thu, Jan 29, 2015 at 09:44:46AM +0000, Ard Biesheuvel wrote:
> >> The __asmeq macro is used inside inline asm statements to ensure that
> >> register asm variables that explicitly specify a register are mapped
> >> correctly onto those registers when used in inline asm input and output
> >> constraints. However, the string based matching fails to take into account
> >> that 'fp' is often referred to as 'r11' and 'ip' is often referred to as
> >> 'r12', (e.g., by clang), causing false negatives.
> >>
> >> Fix this by making __asmeq consider the ("fp","r11"), ("r11","fp"),
> >> ("ip","r12") and ("r12","ip") cases specifically.
> >>
> >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >
> > The method adopted is rather horrid in itself, but I guess there's no
> > other way to deal with this... so I'm okay with the patch.  (I won't
> > say I'm happy with it!)
> >
> 
> How about we retain the old version unless __clang__ is defined?

I don't see much point - that only adds to the complexity with a
#ifdef.  The register names are equivalent in any compiler.

It's better that we avoid #ifdefs so we get better build coverage.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-01-30 10:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29  9:44 [PATCH v2] ARM: teach __asmeq that r11 == fp and r12 == ip Ard Biesheuvel
2015-01-29 11:48 ` Russell King - ARM Linux
2015-01-30  7:21   ` Ard Biesheuvel
2015-01-30 10:18     ` Russell King - ARM Linux [this message]
2015-01-29 12:44 ` Alex Elder
2015-01-29 16:49 ` Nicolas Pitre

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=20150130101821.GI26493@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).