Subject: Re: Question
To: Lennart Augustsson <augustss@cs.chalmers.se>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-alpha
Date: 12/09/1998 10:09:14
On Wed, 9 Dec 1998 13:04:55 +0100 (MET)
Lennart Augustsson <augustss@cs.chalmers.se> wrote:
> Given an unaligned pointer to a struct on the alpha, is it
> possible to access a byte-sized field of the struct?
> Or do all struct pointers have to be aligned properly?
> (I'm sure having an unaligned pointer is non-ANSI, but
> if it just works I don't care. :-)
No, it won't work. There is no byte load/store, so byte accesses are
"emulated" by doing larger accesses.
If you ever have a question about alignment on the alpha, the answer is
basically always "yes" :-)
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: +1 408 866 1912
NAS: M/S 258-5 Work: +1 650 604 0935
Moffett Field, CA 94035 Pager: +1 650 940 5942