From: Dave Gilbert <gilbertd@treblig.org>
To: axp-list@redhat.com
Subject: Re: Unaligned traps again ;)
Date: Sun, 2 May 1999 16:31:12 +0100 (GMT) [thread overview]
Message-ID: <Pine.LNX.3.96.990502162708.379F-100000@tardis> (raw)
In-Reply-To: <XFMail.990502162547.svax@cybercable.tm.fr>
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 __/
prev parent reply other threads:[~1999-05-02 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-02 14:25 Unaligned traps again ;) The MaDd0k
1999-05-02 15:31 ` Dave Gilbert [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox