Subject: Re: Alignment problems on Acorn{26,32}
To: Reinoud Zandijk <reinoud@netbsd.org>
From: Chris Gilbert <chris@dokein.co.uk>
List: port-arm
Date: 11/02/2003 21:40:46
On Sun, 2 Nov 2003 00:33:25 +0100
Reinoud Zandijk <reinoud@netbsd.org> wrote:

> Dear folks,
> 
> after the recent patches to allow for misaligned access, the kernel
> panics on a Acorn32 RiscPC (ARM7) with an ne2000 podule. It tries to
> read a 16 bit with `ldr r3, [r0, #0x0002]' (insw+0x30) in blockio.S
> and gets a `Alignment Fault 1' trap and dies. It looks like it wants
> to execute the `fastinsw' routine.
 
> Other functions in blockio.S have the same alignment problems. Could
> anyone please take a look and fix it? (I haven't been following
> port-arm that much lately)

Perhaps the fastest way for now is to remove the aligned optimised
cases.

I also suspect that that code may not work correctly with big endian
either, but I'm not sure.

I believe ldrh and strh could be used on arms with those instructions to
speed up that code.

Chris