[hackers] [scc] [cc2] fix qbe alloc instruction alignment size || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 3 Jun 2016 13:42:28 +0200 (CEST)

commit 17bf67f3529638847c6100f79f2f9d91766a2a6d
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Fri Jun 3 13:20:12 2016 +0200
Commit: Quentin Rameau <quinq_AT_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
_AT_@ -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
Received on Fri Jun 03 2016 - 13:42:28 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 03 2016 - 13:48:14 CEST