kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How to comprehend this code snippet: __asm__ __volatile__("rdtsc" : "=A"(t))?
@ 2020-07-16 12:20 孙世龙 sunshilong
  2020-07-16 12:52 ` Jeffrey Walton
  0 siblings, 1 reply; 4+ messages in thread
From: 孙世龙 sunshilong @ 2020-07-16 12:20 UTC (permalink / raw)
  To: kernelnewbies

Hi, list

Here is the code snippet:
#define ipipe_read_tsc(t)              \
__asm__ __volatile__("rdtsc" : "=A"(t))

I found that the rdtsc (Read Time-Stamp Counter) instruction is used
to determine how many CPU ticks took place since the processor was
reset.

But what does
"=A"(t)
mean?

Thank you for your attention to this matter.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-16 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).