avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Efficient htons/swap16 or htonl/swap32 in place?


From: Harald Kipp
Subject: Re: [avr-gcc-list] Efficient htons/swap16 or htonl/swap32 in place?
Date: Sat, 18 Aug 2001 12:34:28 +0100 (MEZ)

>>Is there any way to convince the compiler to generate:
>>
>>      ldd r20,Y+1
>>      ldd r21,Y+2
>>      std Y+1,r21
>>      std Y+2,r22

Peter,

sure there is a way, simply code these in an inline asm. 
[Joke alert] :-)

Seriously, the problem at this point is, that register
usage isn't predictable. Only the compiler knows, which
values are hold by which registers. There's no way I
kow of, to pass this information to the inline asm 
statements.

Harald





reply via email to

[Prev in Thread] Current Thread [Next in Thread]