kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Jeffrey Walton <noloader@gmail.com>
To: "孙世龙 sunshilong" <sunshilong369@gmail.com>
Cc: kernelnewbies <Kernelnewbies@kernelnewbies.org>
Subject: Re: How to comprehend this code snippet: __asm__ __volatile__("rdtsc" : "=A"(t))?
Date: Thu, 16 Jul 2020 09:42:18 -0400	[thread overview]
Message-ID: <CAH8yC8mniGumUqRU2BBEw2aS=LwkAx3YGt10jKtUSX0CwG2VOQ@mail.gmail.com> (raw)
In-Reply-To: <CAAvDm6aQc4E1mo468Bw9KHLsGvvzvkdUe87qJTSTq4yV_8t83A@mail.gmail.com>

On Thu, Jul 16, 2020 at 9:25 AM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
>
> >The 'A' is the constraint EAX:RDX register pair.
> >Also see https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
> >and https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html.
> Thanks to your attached document, I find a lot of useful information.
> BTW,  What does "The A register", "The B register" and etc mean?
> I googled but didn't get any useful information.
> Could you please give me a few brief explanations or suggest some
> documents for me to go through?

See the docs for the various constraints. Also see
https://gcc.gnu.org/onlinedocs/gcc/Constraints.html#Constraints.

Jeff

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2020-07-16 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 12:20 How to comprehend this code snippet: __asm__ __volatile__("rdtsc" : "=A"(t))? 孙世龙 sunshilong
2020-07-16 12:52 ` Jeffrey Walton
2020-07-16 13:24   ` 孙世龙 sunshilong
2020-07-16 13:42     ` Jeffrey Walton [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='CAH8yC8mniGumUqRU2BBEw2aS=LwkAx3YGt10jKtUSX0CwG2VOQ@mail.gmail.com' \
    --to=noloader@gmail.com \
    --cc=Kernelnewbies@kernelnewbies.org \
    --cc=sunshilong369@gmail.com \
    /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).