From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 2 Dec 2002 20:17:47 +0100 From: Samuel Rydh To: Gabriel Paubert Cc: linuxppc-dev@lists.linuxppc.org Subject: Re: asm inline Message-ID: <20021202191747.GA11391@ibrium.se> References: <20021202170017.GA8469@ibrium.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: owner-linuxppc-dev@lists.linuxppc.org List-Id: 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/