commit 215dacdfe68ec6d875de8cf3045cddcfa53ad17d
parent 8ff88be8db94a21d58ecc3a5b103d92f47005346
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 7 Dec 2024 13:44:26 +0100
cc2/z80: Remove ret parameter
This was a premature optimization that was removed long time ago
from the qbe port but it still remained in the z80 port.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/cmd/scc-cc/cc2/z80-scc/cgen.c b/src/cmd/scc-cc/cc2/z80-scc/cgen.c
@@ -26,8 +26,7 @@ lhs(Node *np)
switch (np->op) {
case OMEM:
case OAUTO:
- *new = *np;
- return new;
+ return np;
case OPTR:
return rhs(np->left);
case OFIELD:
@@ -90,7 +89,7 @@ cgen(Node *np)
code(ASRET, NULL, p, NULL);
break;
case OBSWITCH:
- swtch(rhs(np->left);
+ swtch(rhs(np->left));
break;
default:
rhs(np);