scc

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

commit a5a233366a4cbbf7cf9d4c02f7bcc7d022349563
parent e2d1f60bd74b551c254b9241702738037a78ccc1
Author: Quentin Rameau <quinq@fifth.space>
Date:   Tue,  7 Jun 2016 16:32:22 +0200

[cc2-qbe] fix unary and binary operators generation

Diffstat:
Mcc2/arch/qbe/code.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c @@ -384,7 +384,7 @@ binary(void) strcpy(to, addr2txt(&pc->to)); strcpy(from1, addr2txt(&pc->from1)); strcpy(from2, addr2txt(&pc->from2)); - printf("\t%s %c=\t%s\t%s,%s\n", to, p->letter, p->txt, from1, from2); + printf("\t%s =%c\t%s\t%s,%s\n", to, p->letter, p->txt, from1, from2); } static void @@ -406,7 +406,7 @@ unary(void) strcpy(to, addr2txt(&pc->to)); strcpy(from, addr2txt(&pc->from1)); - printf("\t%s %c=\t%s\t%s\n", to, p->letter, p->txt, from); + printf("\t%s =%c\t%s\t%s\n", to, p->letter, p->txt, from); } static void