Comment 11 for bug 1608882

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

Hi JiriJ,

The reason packed and aligned are different is because aligned specify a *minimum* alignment. When doing aligned (1) it requests the structure to be at least 1byte aligned but since it must already be 2byte aligned because of the short it's effectively a nop. If you want the structure to be packed but have the code generation using strh, you should use both packed and aligned(2).

Now I agree that though strb is expected when using only packed, it should not generate ldrb but that's an optimization issue and thus is less critical.