Machine Instruction encoding
sashti srinivasan
svasn_tcpip@yahoo.co.in
Mon Mar 22 08:20:00 GMT 2004
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
More information about the Gcc-help
mailing list