Re: unaligned accesses

From: John David Anglin (dave@hiauly1.hia.nrc.ca)
Date: Fri Jan 10 2003 - 08:30:25 MST


> >> hmmm buggy: not always, the triky case is when you have to access to
> those
> >> kind of data encapsulated into a structure. I do not yet find any workaround
> >> or how to fix this kind of pb. Any idea (gcc-3.3?)?
> >
> >eh? what do you mean?
> >
> well I will try to find back the example I encounter (somewhere in jfs-1.0.23
> IIRC)

I think what Randolph is saying is that structures don't provide a machine
independent way of transfering data from one machine to another. If you
want to do that, you need a machine independent specification for the data.
Having worked on code to decode realtime telemetry data from various
spacecraft, I know that you need to be very aware of type sizes, alignment
and endianness issues on each architecture. The same kind of issues come
up in handling graphics data.

Dave

-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


List: parisc-linux@lists.parisc-linux.org