Comment 6 for bug 1608882

Revision history for this message
JiriJ (jirij-0) wrote :

Hi Thomas,
I try to summarize th current state and observation. In attachment, you can find two modules and one header for testing purpose. Compiler options / switches retain the same ones as in the previous posts.

Scenario 1:
* Types defined in the header another.h have the attribute "__attribute__ ((aligned (1)))" attached.
* Both write operations in foo() are properly compiled - only "strh" instructions detected.

Scenario 2:
* The attribute of the types defined in the header another.h changes to "__attribute__ ((packed))" attached.
* The write operation to the external variable tPldRxRegSet_Test (defined in the module "another.c") is in the strange, already reported way:

movw r3, #:lower16:tPldRxRegSet_Test
movt r3, #:upper16:tPldRxRegSet_Test

mvn r4, #33
mvn r0, #82

ldrb r1, [r3, #4] @ zero_extendqisi2 // !!! UNWANTED reading !!!
strb r4, [r3, #4]
ldrb r4, [r3, #5] @ zero_extendqisi2 // !!! UNWANTED reading !!!
strb r0, [r3, #5]

Hopefully this could describe the issue in better way...

Thanks for your hints,
BR, Jiri