Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!helios.ee.lbl.gov!pasteur!homer.Berkeley.EDU!mcgrath From: mcgrath@homer.Berkeley.EDU (Roland McGrath) Newsgroups: comp.arch Subject: Re: Is handling off-alignment important? Message-ID: Date: 8 Aug 90 05:02:32 GMT References: <104037@convex.convex.com> <8840014@hpfcso.HP.COM> <2357@crdos1.crd.ge.COM> <25900@mimsy.umd.edu> <2392@crdos1.crd.ge.COM> Sender: news@pasteur.Berkeley.EDU Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) Lines: 17 X-Local-Date: 7 Aug 90 22:02:32 PDT In-reply-to: davidsen@crdos1.crd.ge.COM's message of 6 Aug 90 15:07:42 GMT On machines that "don't handle misaligned accesses", what do they do when one happens anyway? Assuming they don't just go up in a puff of blue smoke (which would be alright with me, as long as the color of smoke is documented), or cease functioning and need to be power-cycled (which would be alright too, if documented), the least useful thing I can think of for them to do (within the bounds of reason) is to do the access wrong (which seems likely since if they want the low-order two bits of the address to always be zero, they might well not pay attention to them). Is this what is done? The second least useful thing I can think of is to cause a hardware trap to software, which would presumably be horrendously slow. I would be completely happy with that. Write a software trap handler to deal with it, and write your compiler such that it never happens if avoidable. -- Roland McGrath Free Software Foundation, Inc. roland@ai.mit.edu, uunet!ai.mit.edu!roland