delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/29/19:23:30

From: leathm AT solwarra DOT gbrmpa DOT gov DOT au (Leath Muller)
Message-Id: <199704292309.JAA16779@solwarra.gbrmpa.gov.au>
Subject: Re: Alignment
To: wapex AT silesia DOT top DOT pl (Michal)
Date: Wed, 30 Apr 1997 09:09:32 +1000 (EST)
Cc: djgpp AT delorie DOT com
In-Reply-To: <3365EBE9.29EA@silesia.top.pl> from "Michal" at Apr 29, 97 02:39:05 pm

> I have written a FPU texture mapper that uses doubles in its inner loop.
> I have to align them manualy (by adding some extra variables) to
> increase speed, every time I add some code or variables above, so I'm
> shure my ineer loop's data aren't aligned properly. I want to align them
> on 32 byte boundary so my inner would have less cash misses. 16 byte
> boundary was just an exaple. It would be nice to have authomaticly
> aligned data.

I think what you mean is you want the _first_ variable on a 32 byte offset,
right? Just to clear up, you want something like:

    x0     <- Aligned on 32 byte boundary
    y0     <- &x0 + 8
    z0     <- &x0 + 16

This is what I think your trying to say isn't it? If it isn't, then I have
no idea what your doing or why your doing it (it would just run slower... :)
Otherwise, are you passing in arguments to a subroutine with local variables,
or do you have global variables?

Just a question though - why use doubles in the inner loop, single precision
is twice as fast and just as accurate for something like texture mapping...

Leathal.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019