ref: c2dc59a3adb69174b02e394ef7f513fb11577dd3
parent: 580a13e36e24a600cea5207ecde9eebadf172eda
author: Quentin Rameau <quinq@fifth.space>
date: Fri Jun 3 09:20:12 EDT 2016
[cc2] fix qbe alloc instruction alignment size We didn't use qbe alignment requirements (4, 8, 16). Align to it and allocate target size.
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -302,7 +302,7 @@
extern Type ptrtype;
printf("\t%s =%s\talloc%lu\t%lu\n",
- symname(sym), size2asm(&ptrtype), tp->size, tp->align);
+ symname(sym), size2asm(&ptrtype), tp->align+3 & ~3, tp->size );
}
void