commit 17bf67f3529638847c6100f79f2f9d91766a2a6d
Author:     Quentin Rameau <quinq@fifth.space>
AuthorDate: Fri Jun 3 13:20:12 2016 +0200
Commit:     Quentin Rameau <quinq@fifth.space>
CommitDate: Fri Jun 3 13:41:55 2016 +0200

    [cc2] fix qbe alloc instruction alignment size
    
    We didn't use qbe alignment requirements (4, 8, 16).
    Align to it and allocate target size.

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index 30e5e81..c38821f 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -302,7 +302,7 @@ alloc(Symbol *sym)
        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

Reply via email to