Grant Edwards @ Thu, 14 Feb 2008 00:10:27 +0000 (UTC)
>
> On 2008-02-13, Oleg Verych <[email protected]> wrote:
>> Grant Edwards @ Wed, 13 Feb 2008 18:55:32 +0000 (UTC)
>>>
>>> On 2008-02-13, Oleg Verych <[email protected]> wrote:
>>>
>>>> Alignment of members as well as whole structure is arbitrary. That's why
>>>> mspgcc have "packed" attribute, but it's without (implicit for many
>>>> developers) magic.
>>>
>>> Are you saying tht the MSP430 backend gcc does not correctly
>>> generate code to access misaligned struct members the way that
>>> other backends (e.g. ARM) do?
>>
>> Based on what i've saw in this thread -- yes.
>
> If that's the case, it might need to be spelled out a little
> more clearly in the manual.

> It wasn't clear to me that the web page mentioned earlier was saying
> that.  That web page seemed to be talking about peripheral registers.

Any unaligned struct members *and* structures themselves on RISC
generally, i guess. Better to ask developers. There is an alternative
-- byte by byte access. But how efficient it can be? Better to have
good _design_ right from the start.

As for portability, it's interesting to notice TCP/IP data structures
and (Intel-ish) USB, and what problems latter has on archs without
hardware support for unaligned access...
______


Reply via email to