Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Unaligned traps again ;)
@ 1999-05-02 14:25 The MaDd0k
  1999-05-02 15:31 ` Dave Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: The MaDd0k @ 1999-05-02 14:25 UTC (permalink / raw)
  To: axp-list

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 ;)

Thanks for help,
Steph


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Unaligned traps again ;)
  1999-05-02 14:25 Unaligned traps again ;) The MaDd0k
@ 1999-05-02 15:31 ` Dave Gilbert
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Gilbert @ 1999-05-02 15:31 UTC (permalink / raw)
  To: axp-list

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 __/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-05-02 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-02 14:25 Unaligned traps again ;) The MaDd0k
1999-05-02 15:31 ` Dave Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox