Moving long long int using inline asm

Tim Prince tprince@myrealbox.com
Thu Feb 1 09:34:00 GMT 2007


Mohamed Shafi wrote:
> Hello all,
>
> There are two variables
> long long var1;
> long long var2;
>
> Using inline assembly how will i be able to move the value from var1 
> to var2,
> i.e var2 = var1
>
> The architecture has only a 32 bit move instruction say mov32
> Something like
>
> asm( "mov32 %0, %1"  : "=r"(var2) : "r"(var1) );
>
> would have worked fine for 32bit data types.What is the similar syntax
> for 64 bit data types?
>
> Can someone help me?
>

As you don't care to reveal enough details to permit an answer, you 
might start by checking how your copy of gcc does it for your target 
(e.g. gcc -S...).  If you don't care to do that, you have no business 
with asm.



More information about the Gcc-help mailing list