Dmitry wrote:
this is a strcpy trick -- if gcc knows that data are world aligned, it uses word operation.
if it does not -- byte ones.
Alignment of FieldDevices[] isn't known at the compile time as follows from your example.

Hmm, ti be honest this wasn't my concern.

My expactation was, taht wih strict alignment the word would be align correctly by the compiler, thus effectively ignoring the attribute packed...

This was my expectation:
>
>          mov.b   #llo(11), &HartDevicesM$FieldDevices+2
>          mov.b   #llo(22), &HartDevicesM$FieldDevices+3
>          mov.b   #llo(33), &HartDevicesM$FieldDevices+4
>          mov.b   #llo(44), &HartDevicesM$FieldDevices+5
>          mov.b   #llo(55), &HartDevicesM$FieldDevices+6
>          mov     2(r8), &HartDevicesM$FieldDevices+8

Unfortunately it has not been fullfilled.

So I'm asking again: is there any potential switch in msp430.h or so, which forces words to even addresses?

Hardy

Reply via email to