kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: adam8157@gmail.com (Adam Lee)
To: kernelnewbies@lists.kernelnewbies.org
Subject: What does %P1 mean in gcc inline assembly?
Date: Mon, 7 Mar 2016 10:51:58 +0800	[thread overview]
Message-ID: <20160307025158.GB1158@rmbp> (raw)
In-Reply-To: <F7866D80-A9FF-4B61-863D-582D6E953C2E@163.com>

On Sat, Mar 05, 2016 at 11:37:21AM +0800, ?? wrote:
> 
>     On Mar 4, 2016, at 11:59 PM, Dave Tian <dave.jing.tian@gmail.com> wrote:
> 
>     This ?P? is used to make gcc happy and work.
>     Without ?P?, this inline would be interpreted as:
>     leal $-512(%esp), %eax
>     With ?P?, this inline is the thing we really want:
>     leal -512(%esp), %eax
> 
>     Eventually, my gcc 4.9.2 does not compile with ?P? is missing. I am not
>     sure if this is still the case for newer gcc (5/6). But you get the point.
> 
>     -daveti
> 
> Thank you for your detailed answer !
> 
> By the way? If someone have the problems alike, I suggest them to write some
> inline assembly and check the compiler?s assembly output.

Didn't get different outputs here, do you have updates?

-- 
Adam Lee
http://adam8157.info

  reply	other threads:[~2016-03-07  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 12:36 What does %P1 mean in gcc inline assembly? 张云
2016-03-04 15:59 ` Dave Tian
2016-03-05  3:37   ` 张云
2016-03-07  2:51     ` Adam Lee [this message]
2016-03-07  3:22       ` 回复:Re: " 张云

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=20160307025158.GB1158@rmbp \
    --to=adam8157@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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).