align emitted code

Functions are now aligned on 16-byte
boundaries. This mimics gcc and should
help reduce the maximum perf impact of
cosmetic code changes. Previously, any
change in the output of qbe could have
far reaching implications on alignment.

Thanks to Roland Paterson-Jones for
pointing out the variability issue.
This commit is contained in:
Quentin Carbonneaux 2024-08-15 23:11:20 +02:00
parent e8fa27bcdb
commit efcb5465e5

View file

@ -1219,6 +1219,7 @@ parse(FILE *f, char *path, void dbgfile(char *), void data(Dat *), void func(Fn
dbgfile(tokval.str);
break;
case Tfunc:
lnk.align = 16;
func(parsefn(&lnk));
break;
case Tdata: