scc

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

commit b675c815310c00aa864eba2628485e4992ea2831
parent b4fc058c601a150c47a8fa05c3286d248441c16d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 17 Aug 2016 17:47:48 +0200

[cc2-qbe] Fix OCONST in rhs()

When we have a constant we do not have to move it to a temporary,
and of course we do not have to load from it.

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

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -422,6 +422,8 @@ rhs(Node *np, Node *ret) case OEFUN: return NULL; case OCONST: + *ret = *np; + return np; case OMEM: case OAUTO: return load(np, ret);