Stack declaration attribute aligned vs. .align
Posted: Thu Oct 23, 2014 6:26 pm
In the examples, the following code is used for stack alignment:
asm( " .align 4 " );
DWORD MyTaskStk[USER_TASK_STK_SIZE] __attribute__( ( aligned( 4 ) ) );
Are both directives needed? I would think the .asm one isn't needed since the aligned attribute does the same thing. I saw some notes about older versions of GCC not working correctly so is that the reason?
-Bob
asm( " .align 4 " );
DWORD MyTaskStk[USER_TASK_STK_SIZE] __attribute__( ( aligned( 4 ) ) );
Are both directives needed? I would think the .asm one isn't needed since the aligned attribute does the same thing. I saw some notes about older versions of GCC not working correctly so is that the reason?
-Bob