public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "sashti srinivasan" <svasn_tcpip@yahoo.co.in>
To: gcc-help@gcc.gnu.org
Subject: Machine Instruction encoding
Date: Mon, 22 Mar 2004 08:20:00 -0000	[thread overview]
Message-ID: <20040322041057.53838.qmail@web8107.mail.in.yahoo.com> (raw)

Hello All,
 
   The following is a line in rtems' timer driver
 source.
     asm volatile(".byte 0x0F, 0x31" : "=A" (result));
   
   RTEMS mailing list clarified me saying that it is
encoding of pentium rdtsc instruction.  Please tell me
how the above statement differs from the one below.

         asm("rdtsc result");
 (Assuming the instruction mnemonic is correct)
 
   Only thing I found from gnu documentation for gcc
 that '=' specifies that result is a output of the
 instruction.  According to the document, there must
 be an instruction pnemonic string first inside the
 paranthesis.  But there is the directive .byte
 there.  Does this mean the opcode directly?
 
   The document also says that the arguments can be
 referred like %0, %1 etc.  But there is nothing like
 this here.  Is it because, since there is only one
 operand, it is assumed to follow the opcode?

   Any other reference than info pages of gcc provides
more details?
    
   Please clear my doubts.
 
 With Best Regards
 Srinivasan


________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. 
Go to: http://in.insurance.yahoo.com/licspecial/index.html

             reply	other threads:[~2004-03-22  4:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22  8:20 sashti srinivasan [this message]
2004-03-22  8:20 ` Ian Lance Taylor
2004-03-24 11:25   ` sashti srinivasan
2004-03-24 13:44     ` Ian Lance Taylor
2004-03-28  3:16       ` movl $1f sashti srinivasan
2004-03-29  5:22         ` Falk Hueffner

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=20040322041057.53838.qmail@web8107.mail.in.yahoo.com \
    --to=svasn_tcpip@yahoo.co.in \
    --cc=gcc-help@gcc.gnu.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).