aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2024-08-15 23:11:20 +0200
committerQuentin Carbonneaux <[email protected]>2024-08-15 23:11:41 +0200
commitefcb5465e597571820391bee450dd1e8def300b4 (patch)
treee2e73fa0b54f2d735f934bdef53444e8f29d6b32
parente8fa27bcdb2872588e39b398f7857157fb249628 (diff)
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.
-rw-r--r--parse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index a745779..caab452 100644
--- a/parse.c
+++ b/parse.c
@@ -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: