Subject: Re: Many broken packages use Scheme -- weird!
To: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
From: Chris G. Demetriou <cgd@netbsd.org>
List: port-arm32
Date: 10/21/1998 13:58:12
Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us> writes:
> > I'm no real expert on ARM, but one surprising (to me, somebody who's
> > used to other architectures) thing we found while hacking drivers was
> > that unaligned accesses produce "weird" data (basically, the data
> > 'rolled' in the register, depending on the address used to fetch it).
> 
> Oww.  Shades of the original IBM RT procesor (which "rounded down"
> unaligned accesses)
> 
> Unaligned accesses silently give you corrupted data?  Ewww...

Not "corrupted," "rolled."  It's deterministic, and probably even
documented.  8-) The "weird" comment is "compared to what you'd
expect if you'd used many other architectures."


For instance, consider memory:

byte	0	1	2
value	0x0a	0x0b	0x0c

					ARM		x86
read a 16-bit quantity from 0x0		0x0b0a		0x0b0a
read a 16-bit quantity from 0x1		0x0a0b		0x0c0b

(that's from memory, may be entirely bogus (even the x86 bits 8-), but
conveys the feel of the behaviour.)

-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.