From: "H. Peter Anvin" <hpa@zytor.com>
To: Brian Gerst <brgerst@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
"H.J. Lu" <hjl.tools@gmail.com>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: "m" constraints, jumps, and alternatives
Date: Thu, 20 Feb 2014 19:43:28 -0800 [thread overview]
Message-ID: <5306CB60.3070302@zytor.com> (raw)
In-Reply-To: <CAMzpN2ie6ALLmL_A+eaQ54aKaHZkwtTr+AqGL6ThHM1Ay+VfFg@mail.gmail.com>
On 02/20/2014 07:30 PM, Brian Gerst wrote:
>
> The percpu code uses %P to force absolute addressing mode, instead of
> rip-relative.
>
P -- if PIC, print an @PLT suffix.
Clearly it has more effects than that... as the code does reveal:
/* Avoid (%rip) for call operands. */
if (CONSTANT_ADDRESS_P (x) && code == 'P'
&& !CONST_INT_P (x))
That should work... in the probably extremely rare case that any of
these references go to global addresses then they spend an extra byte
(and a little more work during kASLR relocation or module insertion).
-hpa
prev parent reply other threads:[~2014-02-21 3:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 23:27 "m" constraints, jumps, and alternatives H. Peter Anvin
2014-02-21 0:30 ` Linus Torvalds
[not found] ` <CAMzpN2ie6ALLmL_A+eaQ54aKaHZkwtTr+AqGL6ThHM1Ay+VfFg@mail.gmail.com>
2014-02-21 3:43 ` H. Peter Anvin [this message]
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=5306CB60.3070302@zytor.com \
--to=hpa@zytor.com \
--cc=brgerst@gmail.com \
--cc=hjl.tools@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=ross.zwisler@linux.intel.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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