linux-mips-fnet
[Top] [All Lists]

Re: load_unaligned() and "uld" instruction

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: load_unaligned() and "uld" instruction
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Fri, 6 Oct 2000 02:43:37 +0200
Cc: Jun Sun <jsun@mvista.com>, "Kevin D. Kissell" <kevink@mips.com>, Dominic Sweetman <dom@algor.co.uk>, linux-mips@oss.sgi.com, linux-mips@fnet.fr
In-reply-to: <Pine.GSO.3.96.1000927112232.25150A-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Wed, Sep 27, 2000 at 12:06:31PM +0200
References: <39D0E51C.79A0BE50@mvista.com> <Pine.GSO.3.96.1000927112232.25150A-100000@delta.ds2.pg.gda.pl>
On Wed, Sep 27, 2000 at 12:06:31PM +0200, Maciej W. Rozycki wrote:

>  Please don't.  Gcc already has means to generate proper unaligned
> accesses.  See include/asm-alpha/unaligned.h for how to achieve them in a
> portable way (i.e. using packed structs) without the problematic inline
> asm.

That's all very nice and guess what - I tried it when I originally wrote
ualigned.h for Linux.  Try building the mentioed Alpha code with and older
compiler like egcs 1.0.3a and take a look at it [1].  23 instructions for
loading a double world - that's just mindboggling.

  Ralf

[1] free barf bag on request.

<Prev in Thread] Current Thread [Next in Thread>