Search code examples
cgcc68000

Alignment of functions


How do I make the functions align at 4-byte boundaries with GCC, target 680x0?

-malign-functions=4 does not seem to do the trick, by itself anyway. Some kind of option meant to improve cache performance on 68020 and up perhaps?


Solution

  • -malign-functions=4 should do the trick but it can be overridden with the function attribute aligned(). Make sure that your code doesn't use this (for example with a macro).