From: Andrew Crabtree Message-Id: <199711131747.AA236333222@typhoon.rose.hp.com> Subject: Re: Port of bzip2 To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) Date: Thu, 13 Nov 1997 9:47:02 PST Cc: djgpp AT delorie DOT com In-Reply-To: ; from "Eli Zaretskii" at Nov 13, 97 1:13 pm Reply-To: andrewc AT rosemail DOT rose DOT hp DOT com Precedence: bulk > AFAIK, there's no such thing as SIGBUS on machines which don't require > alignment. x86 can handle misaligned objects, they just inflict runtime > penalty. Machines that have SIGBUS cannot access misaligned objects at > all. Not sure here. I think the pentium (at least) and above have this capability. I doubt its enabled in most (any?) cases though. From 'Pentium Processor User's Manual Volume 3' Page 14-24 (edited for length by yours truly) 14.9.16. Interrupt 17 - Alignment Check An alignment-check fault can be generated for access to unaligned operands. For example, a word stored at an odd byte address, or a doubleword stored at an address which is not an integer multiple of four .... To enable alignment checking, the following conditions myst be true: ^ AM bit in the CR0 register is set ^ AC flag is set ^ CPL is 3 (user mode) > A better way is to check SIGBUS itself: > Here, also, a better way is to test for the (un)supported feature rather > than for a system name: Of course. Right on both counts. I have a tendency to do the quick and dirty fix. I will send off your changes to the maintainer. Andy -- _______ ___________________________________________________________ / Andrew Crabtree / Workgroup Networks Division ____ ___ / Hewlett-Packard / / / / Roseville, CA __/ __/ _____/ 916/785-1675 / andrewc AT rosemail DOT rose DOT hp DOT com ___________ __/ _____________________________________________________