Unaligned 64-bits access on FreeBSD/powerpc

Peter Grehan grehan at freebsd.org
Thu Aug 3 18:52:06 UTC 2006


> Well, actually *nix has a long history of just killing the program with 
> SIGBUS in such case.
> 
> I am just wondering if it's really expected behavior on FreeBSD/powerpc 
> or not.

  No :(

  What system are you running on ? I was pretty sure that G3/G4 CPUs 
allowed unaligned accesses unless you explicitly disabled it (except for 
cases such as vector ops). A 64 bit op on these CPUs should decompose 
into separate 32-bit accesses ala i386 so the same case should occurr 
for unaligned 32-bit ops.

  In any event, the default should be that unaligned accesses are 
handled, and then have switches to optionally uprintf the address, or 
SIGBUS.

later,

Peter.


More information about the freebsd-ppc mailing list