Subject: Re: asm inline

From: Samuel Rydh <[email-masked]>
Date: Mon, 2 Dec 2002 20:17:47 +0100

On Mon, Dec 02, 2002 at 06:53:47PM +0100, Gabriel Paubert wrote:
> > ...which is desirable in this case. The st_le32 inline is just an efficient
> > way to flip the endian and is not supposted to have any undeclared
> > side effects (like touching hardware).
>
> Efficient?

Well the scenario I had in mind was

	int x = ld_le32( &le_struct.x );
	...
	do some ops on x
	...
	st_le32( &le_struct.x, x )

Hard to beat endian flipping load and store operations in
that context :-). But you are of course right that it is quite
inefficient if one operates on something already loaded into a
register.

/Samuel

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/