Syntax for inline asm for 64 bit variable on 32 bit architecture

de Brebisson, Cyrille (Calculator Division) cyrille@hp.com
Mon Dec 11 22:23:00 GMT 2006


Hello,

What is the syntax for using 64 bit variables in inline asm on a 32 bit
architecture. How do you know which register pair is used?
For example, how to code a+=b; in this case..
Long long a= 0, b = 1;
Asm ("add %0, %1 \n\t adc %2, %3" : "+r" (a) : "r" (b));

Thanks, cyrille



More information about the Gcc-help mailing list