On Fri, 29 Nov 2002, Andreas Beck wrote:
> > 1) Aligned data
> > If I am right there is no way to portably cause the alignment of 
> > variables in a function declaration.  
> 
> Hugh? In a function declaration? I don't get you here.

I should have just say "declare variables".  Basically I need a lot of
normal variables and/or structures and structure members to be aligned.

> Hmm - Pointer Arithmetics won't work? Usually (unsigned char *)ptr+bla will
> do what you want.

The need is to do stuff more like ptr % 8 and logical operations on
the lowest signifgant bits.  Most of it is related to alignment and other 
architectural issues.

> It is _not_ guaranteed in any way by C standards, that you can do
> arithmetics on pointers yourself by casting them to integer types.
> AFAIK there even existed some perverse architectures, that had very strange
> representations for pointers.

This isn't really a concern in the case of SWAR, because most SWARs are 
architecture specific, so it would only be used on architectures that 
do not have such nuances.

--
Brian

Reply via email to