scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 17bf67f3529638847c6100f79f2f9d91766a2a6d
parent 1e62acd8544247089ee9d0102ec2da973e57135a
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri,  3 Jun 2016 13:20:12 +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.

Diffstat:
Mcc2/arch/qbe/code.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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