From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 24533 invoked from network); 2 May 1999 16:05:35 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 2 May 1999 16:05:35 -0000 Received: from tele-post-20.mail.demon.net (tele-post-20.mail.demon.net [194.217.242.20]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id LAA11189 for ; Sun, 2 May 1999 11:34:22 -0400 Received: from [194.222.210.232] (helo=tardis) by tele-post-20.mail.demon.net with smtp (Exim 2.12 #2) id 10dyG5-0005Rt-0K for axp-list@redhat.com; Sun, 2 May 1999 15:34:21 +0000 Date: Sun, 2 May 1999 16:31:12 +0100 (GMT) From: Dave Gilbert X-Sender: gilbertd@tardis To: axp-list@redhat.com Subject: Re: Unaligned traps again ;) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 2 May 1999, The MaDd0k wrote: > I just started writing a raytracer, but when I run it, it causes > unaligned traps. > > Could anyone tell me if there are special things to do to prevent > that ? > Are there some tricks to use within data structures or classes declaration ? > Or maybe something else ? > > I really want my program ot be 64 bits clean ;) It is not so much a 64 bit cleanliness issue - somewhere you have an integer, double or something similar which isn't aligned on its natural alignment, that is integers should be sitting on a boundary of 4 bytes - managing not to do this actually takes quite a bit of work in C/C++ ! Intel boxes cope with non-aligned accesses in hardware - but I suspect it slows them down a little. Alpha boxes do it in software so it is even slower. I think you'll find the addresses you see in your logs should help you figure out where in your code your doing it. Dave -------------------------------------------------------------------- / Dr. David Alan Gilbert | Running Linux on | Happy \ \ gro.gilbert @ treblig.org | Alpha, ARM and SPARC | In Hex / \____________________________|___ http://www.treblig.demon.co.uk __/