sashti srinivasan <svasn_tcpip@xxxxxxxxxxx> writes: > > > The following is a line in rtems' timer driver > > > source. > > > asm volatile(".byte 0x0F, 0x31" : "=A" > > (result)); ... > Lots of thanks for the clarifications. Sorry for > further simple doubts. The rdtsc instruction stores > the value(of time) in registers eax and edx, and you > have said that compiler puts data from these registers > into the variable 'result'. But we are not specifying > the registers(eax,edx) in this statement. How the > compiler knows that variable 'result' should be > updated based on these registers?(eax,edx do not > figure in this statement). > > If these are documented anywhere, please give me > pointers. The compiler knows that the results winds up in %eax/%edx due to use of the constraint 'A' on the value to be stored into result. This is documented, sort of, here: http://gcc.gnu.org/onlinedocs/gccint/Machine-Constraints.html#Machine%20Constraints Look for "Intel 386". Ian