scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 31072207d906172698d4b214495f71589f4519f9
parent f9a20062cefdd032483025a45bd4d09cb5f3b94c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  4 Jan 2025 17:38:24 +0100

cc2/qbe: Use a call to copy() when assign OTMP

Qbe has a specific opcode for copies of values and it is better to use
it instead of hacking at the node representation level.

Diffstat:
Msrc/cmd/scc-cc/cc2/qbe/cgen.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmd/scc-cc/cc2/qbe/cgen.c b/src/cmd/scc-cc/cc2/qbe/cgen.c @@ -571,7 +571,7 @@ assign(Node *np) case 0: if (l->op == OTMP) { r = rhs(r); - l->u.sym->numid = r->u.sym->numid; + copy(&np->type, l, r); return r; }