|[2 earlier articles]|
|Re: SPARC compiler optimisation email@example.com (1992-02-14)|
|Re: SPARC compiler optimisation firstname.lastname@example.org (1992-02-15)|
|Re: SPARC compiler optimisation email@example.com (1992-02-22)|
|Re: SPARC compiler optimisation firstname.lastname@example.org (1992-02-26)|
|Re: SPARC compiler optimisation email@example.com (1992-02-27)|
|Re: SPARC compiler optimisation nickh@CS.CMU.EDU (1992-02-28)|
|Re: SPARC compiler optimisation nickh@CS.CMU.EDU (1992-03-02)|
|Re: SPARC compiler optimisation firstname.lastname@example.org (1992-03-02)|
|Re: SPARC compiler optimisation email@example.com (1992-03-09)|
|From:||nickh@CS.CMU.EDU (Nick Haines)|
|In-Reply-To:||nickh@CS.CMU.EDU's message of 28 Feb 92 15:53:21 GMT|
|Organization:||School of Computer Science, Carnegie Mellon University|
|Date:||Mon, 02 Mar 92 20:01:55 GMT|
In article 92-03-004 I wrote that last year I had
difficulty getting gcc or cc to generate ldd and std instructions. I
have received several mail messages, suggesting the use of the -malign
or -dalign switches (on gcc and cc respectively).
I did try these switches. They didn't help. To give a little more detail:
I was working on data in memory that was constructed there by another
program. I knew that certain pointers in this data could _only_ (by the
nature of the other program) point to double-aligned objects. (By the
point my code accesses these objects, it is deducible that they are
double-aligned from the prior bit-twiddling on the pointers, but I did not
expect any compiler to spot this). I spent 4 days trying to convey this
fact to either compiler, inculding the use of -malign and -dalign, and
declaring a union type between these objects and double floats (and long
long ints under gcc). There seemed to be no way.
These switches seem just fine for _allocating_ (static, or even dynamic)
memory as double-aligned, and I seem to recall that in one case the copy
of an object kept in the stack (which was completely unnecessary) was
double-aligned, but I couldn't do what I wanted at all.
I would have dearly liked a type declaration specifier, similar to
`register' or `static', with which I could give the alignment of these
objects, and this seems to me to be the natural solution, but neither
compiler gives it.
Nick Haines firstname.lastname@example.org
Return to the
Search the comp.compilers archives again.