[hackers] [scc] [cc2] Remove references to MEM || Roberto E. Vargas Caballero
commit 5a9c8fe5457c845a087e7c1e18f44ed5d3961095
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Apr 15 12:35:50 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Apr 15 12:38:17 2016 +0200
[cc2] Remove references to MEM
At this moment we have only one enum for everything, and we are using the
same character for the input language, for node operation and for symbol
type. This is bullshit. This patch doesn't solve it, but it remove MEM
that was not used. I have to fix this mesh as fast as possible.
diff --git a/cc2/arch/amd64-sysv/code.c b/cc2/arch/amd64-sysv/code.c
index 7076542..cc7a906 100644
--- a/cc2/arch/amd64-sysv/code.c
+++ b/cc2/arch/amd64-sysv/code.c
_AT_@ -91,7 +91,7 @@ emittree(Node *np)
case OADDR:
emittree(np->left);
break;
- case MEM:
+ case OMEM:
fputs(symname(np->u.sym), stdout);
break;
default:
diff --git a/cc2/arch/i386-sysv/code.c b/cc2/arch/i386-sysv/code.c
index b012cf4..c42256d 100644
--- a/cc2/arch/i386-sysv/code.c
+++ b/cc2/arch/i386-sysv/code.c
_AT_@ -91,7 +91,7 @@ emittree(Node *np)
case OADDR:
emittree(np->left);
break;
- case MEM:
+ case OMEM:
fputs(symname(np->u.sym), stdout);
break;
default:
diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index 2882be5..f4a49b4 100644
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
_AT_@ -141,10 +141,10 @@ sethi(Node *np)
rp = np->right;
switch (np->op) {
- case AUTO:
- case REG:
- case MEM:
- case CONST:
+ case OAUTO:
+ case OREG:
+ case OMEM:
+ case OCONST:
np->address = 11;
break;
default:
diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index 06dbfd9..a993c29 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -95,7 +95,7 @@ emittree(Node *np)
case OADDR:
emittree(np->left);
break;
- case MEM:
+ case OMEM:
fputs(symname(np->u.sym), stdout);
break;
default:
diff --git a/cc2/arch/z80/cgen.c b/cc2/arch/z80/cgen.c
index d0402e0..4fcd2df 100644
--- a/cc2/arch/z80/cgen.c
+++ b/cc2/arch/z80/cgen.c
_AT_@ -29,16 +29,16 @@ sethi(Node *np)
lp = np->left;
rp = np->right;
switch (np->op) {
- case AUTO:
+ case OAUTO:
np->address = 11;
break;
- case REG:
+ case OREG:
np->address = 13;
break;
- case MEM:
+ case OMEM:
np->address = 12;
break;
- case CONST:
+ case OCONST:
np->address = 20;
break;
default:
diff --git a/cc2/arch/z80/code.c b/cc2/arch/z80/code.c
index 8533f02..22a3f45 100644
--- a/cc2/arch/z80/code.c
+++ b/cc2/arch/z80/code.c
_AT_@ -117,7 +117,7 @@ emittree(Node *np)
case OADDR:
emittree(np->left);
break;
- case MEM:
+ case OMEM:
fputs(symname(np->u.sym), stdout);
break;
default:
diff --git a/cc2/code.c b/cc2/code.c
index 80173f7..3a15777 100644
--- a/cc2/code.c
+++ b/cc2/code.c
_AT_@ -38,7 +38,6 @@ addr(int op, Node *np, Addr *addr)
np->u.i = np->u.i;
break;
case LABEL:
- case MEM:
addr->u.sym = np->u.sym;
break;
case AUTO:
Received on Fri Apr 15 2016 - 13:52:13 CEST
This archive was generated by hypermail 2.3.0
: Fri Apr 15 2016 - 14:00:17 CEST